#include<iostream.h>
class score{
int english_score;
public:
score(){english_score=0;}
score(int a){english_score=a;}
score(score&obj){english_score=obj.english_score-1;}
// ~score(){}
int printscore(){return english_score;}
~score(){}
};
void main(){
score stu1();
score stu2(100);
score stu3(stu2);
cout<<"stu1="<<stu1.printscore()<<endl;
}
调试以后说我的printscore没有class。。。怎么改啊
class score{
int english_score;
public:
score(){english_score=0;}
score(int a){english_score=a;}
score(score&obj){english_score=obj.english_score-1;}
// ~score(){}
int printscore(){return english_score;}
~score(){}
};
void main(){
score stu1();
score stu2(100);
score stu3(stu2);
cout<<"stu1="<<stu1.printscore()<<endl;
}
调试以后说我的printscore没有class。。。怎么改啊