参考答案:#include class Cperson{ protected: char name[10]; int id; int sex; public: virtual void getInfor() = 0; virtual void printInfor() = 0;};class CStudent:public Cperson{ protected: int course; public: virtual void getInfor() { using namespace std; cout << "Enter the student's inforamtion" << endl; cout << "Enter the name: "; cin >> name ; cout << "Enter the id: "; cin >> id; cout << "Enter the sex (1 or 0 1.men 0.women): "; cin >> sex...
查看答案