11.1 ʹлĳԱ
д:
Class Student//
{public:                                       //๫óԱ
void get_value( )
{cin>>num>>name>>sex;}
void display( )
{cout<< num: <<num<<endl;
cout<< name: <<name<<endl;
cout<< sex: <<sex<<endl;}
private :                                     //˽гԱ
   int num;
   string name;
   char sex;
};   

class Student1: public Student                 //publicʽStudent1
 {public:
void display_1( )
{cout<< num: <<num<<endl;           //ͼû˽гԱ
       cout<< name: <<name<<endl;         //ͼû˽гԱ
       cout<< sex: <<sex<<endl;           //ͼû˽гԱ
       cout<< age: <<age<<endl;           //˽гԱȷ
       cout<< address: <<addr<<endl;}     //˽гԱȷ
private:
       int age;
       string addr;
 };