帮帮找找这个程序的错误.我自己实在不行了...
#include <iostream.h>#include <string>
class student{
public:
class studentID{
long value;
public:
studentID(long id=0){
value=id;
cout<<"赋给学生的学号:"<<value<<endl;
}
~studentID(){
cout<<"删除学号:"<<value<<endl;
}
};
private:
studentID id;
char name[20];
public:
student(char*sname,long sid=0){
//sname现暂看做字符串,char*是指向字符的指针类型,见第六章;
cout<<"学生名:"<<sname<<endl;
strcqy(name,sname);
studentID id(sid);
}
};
void main(){
student ss("朱明",82020132);
}