请紧记C语言中区分大小写,例如post和Post是不同的两个词。
void show(char post)
{
cout<<"The total wage of the"<
void main()
{
char post;
Teacher *t;
star:cout<<"************Please select the post of the teacher**************\n";
cout<<"1 for Professor 2 for A-Professor 3 for Normal-teacher\n";
cin>>post;
if(post=='1')
{
Professor p;
t=&p;
t->wage();
t->show(post);
}
else if(post=='2')
{
AProfessor a;
t=&a;
t->wage();
t->show(post);
}
else if(post=='3')
{
NormalTeacher n;
t=&n;
t->wage();
t->show(post);
}
else
{
cout<<"Error !!! There have no such option!!!\nPlease select again !!!\n";
goto star;
}
}