vc6.0 构造函数老出错~

来源:百度知道 编辑:UC知道 时间:2024/06/30 08:34:10
class student
{
public:student();
student(int no,string na,char se,float ma,float po,float cp)
{name=no;name=na;sex=se;math=ma;polic=po;cpp=cp;
}
int count()
{counter++;
return 0;}
截取这一部分,第2行就出错,错误提示是:
error C2629: unexpected 'class student ('
是他娘的这么回事啊
<string>有啊~必须有啊~
另外啊~一个程序出了100+问题会不会是编译器的问题啊~
最近我硬盘文件有一次大搬家
连构造函数都调用不了,编译过程还会卡死~
郁闷~

可能是编译器没认出string,看看#include <string>了吗
-------------------------------
error C2629: unexpected 'class student ('
'class student (' 这个东西在哪?第2行?

class student
{

};

class 定义的最后 少了分号。