大虾们帮看看哪错了
#include<iostream>using namespace std;
class Teacher{
private:
char name[10];
int age;
char title[10];
public:
Teacher(char name[10]=0,int b=0,char title[10]=0){}
void get(){
cout<<"input name"<<endl;
cin>>name;
cout<<"input age"<<endl;
cin>>age;
cout<<"input title"<<endl;
cin>>title;
}
void display(){
cout<<"the name is"<<name<<endl;
cout<<"the age is"<<age<<endl;
cout<<"the title is"<<title<<endl;
}
};
class Cadre{
public:
Cadre(char name[10]=0,int b=0,char post[10]=0){}
get(){
cout<<"input name"<<endl;
cin>>name;
cout<<"input age"<<endl;
cin>>age;
cout<<"input post"<<endl;
cin>>post;
}
display(){
cout<<"the post is"<<post<<endl;
}
private:
char name[10];
int age;
char post[10];
};
class Teacher_Cadre:public Teacher,public Cadre{
private:
int wage;
public:
Teacher_Cadre(int wage=0){}
void show(){
Teacher::display();
}
getwage(){
cout<<"input wage"<<endl;
cin>>wage;
}
put(){
cout<<"the wage is"<<wage<<endl;
cout<<"the post is"<<endl;
Cadre::display();
}
};
main(){
Teacher_Cadre tc;
Teacher t1;
t1.get();
tc.show();
Cadre c1;
c1.get();
tc.getwage();
tc.put();
}