#include #include using namespace std; class Employee{ public: Employee(const char *name,const char *id){ strcpy(Name,name); strcpy(Id,id); } char* getName(){ return Name; } char* getId(){ return Id; } void display(){ cout<>week; Manager m("小王","11111111",week); m.display(); cout<<"请输入销售利润:"; int profit; cin>>profit; cout<<"请输入销售件数:"; int x; cin>>x; SaleWorker s("小李","222222",profit,x); s.display(); cout<<"请输入工作小时:"; int hour; cin>>hour; HourWorker h("小何","333333",hour); h.display(); system("pause"); return 0; }