#include <iostream>
using namespace std;class CSchool
{
public:
CSchool()
{
memset(m_name,0,30);
}
void Output()
{cout<<"名字:"<<m_name<<endl;
cout<<"年龄:"<<m_age<<endl;
}
char m_name[30];
int m_age;
};
class CStudent:public CSchool //从CSchool 类派生出的CStudent类
{public:
int m_class;
void input()
{
cin>>m_name;
cin>>m_age;
cin>>m_class;
}
void Outputclass()
{
cout<<"班级:"<<m_class<<endl;
}
};
void main()
{
CStudent *ss= new CStudent;
ss->Input();
ss->Output();
delete ss;
}