class Person
{
public:voidPrint()//Person* this {
cout <<"name"<< _name << endl;
cout <<"age"<<_age <<endl;}
protected:
string _name ="peter";int _age =18;};
class Student : public Person
{
protected:int _stuid;};
class Teacher(派生类) : (继承方式)public Person(基类)
{
protected