请帮助,谢谢
#include <iostream.h>#include < stdlib.h >
class Student
{
int no ;
char name [20] ;
int deg ;
char cname [20] ;
public :
Student () {}
Student ( int n , char na [] , int d , char cn [] ) {}
void disp () { }
~Student () { }
} ;
class body : Student
{
int English ;
int Chinese ;
public :
body () { }
void deg ( int E , int C ) { }
void disp () { }
~body () { }
} ;
void Student :: Student ( int n , char na , int d , char cn )
{
no = n ;
strcpy ( name , na ) ;
deg = d ;
strcpy ( cname , cn ) ;
return ;
}
void Student :: disp ()
{
cout << " no " << no << " name " << name << " deg " << deg << " cname " << cname << endl ;
}
void body :: deg ( int E , int C )
{
English = E ;
Chinese = C ;
}
void body :: disp ()
{
cout << " 总成绩 " << English + Chinese << endl ;
}
void main ( )
{
body A ( 1 , " 李民航 " , 64 , 33 ) ;
A. disp () ;
body B ( 33 , 33 ) ;
B.disp () ;
}找一下错误的原因