Home > Back-end >  c
c

Time:11-21

A person base class has protected members: name, age and gender Members of the public: take arguments constructor;
Person directly derived class the Teacher has to protect members: title; Members of the public: take arguments constructor;
The Person directly derived class Student has protected members: grades; Members of the public: take arguments constructor;
Multiple inheritance of the derived class Graduate with the Teacher and Student as direct base class has four members: allowance; Members of the public: take the constructor, the show function, so the output information requirements create Graduate was achieved through the method of the virtual base class object, and perform the show function,