主题:高手请改下
class stud
{private :
int num;
char name[10];
char sex;
public:
void display()
{ cout<<"num:"<<num<<endl; /*error C2297: '<<' : illegal, right operand has type 'char [5]'*/
cout<<"name:"<<name<<endl; /* error C2297: '<<' : illegal, right operand has type 'char [6]'*/
cout<<"sex:"<<sex<<endl;} /*error C2297: '<<' : illegal, right operand has type 'char [5]'*/
};
class student: public stud
{
private:
int age;
char addr[20];
public:
void show()
{ display ()
cout<<"age:"<<age<<endl;
cout<<"address:"<<addr<<endl;}
}; 小弟实在是不知道怎么改了;望高手指点下!!!!!!!!!不胜感谢![em2][em2][em2][em2][em2][em2]
{private :
int num;
char name[10];
char sex;
public:
void display()
{ cout<<"num:"<<num<<endl; /*error C2297: '<<' : illegal, right operand has type 'char [5]'*/
cout<<"name:"<<name<<endl; /* error C2297: '<<' : illegal, right operand has type 'char [6]'*/
cout<<"sex:"<<sex<<endl;} /*error C2297: '<<' : illegal, right operand has type 'char [5]'*/
};
class student: public stud
{
private:
int age;
char addr[20];
public:
void show()
{ display ()
cout<<"age:"<<age<<endl;
cout<<"address:"<<addr<<endl;}
}; 小弟实在是不知道怎么改了;望高手指点下!!!!!!!!!不胜感谢![em2][em2][em2][em2][em2][em2]