int english ;
int sum ;
Student *next ;
void input() ;
void ReadFile(istream & in) ;
void show() ;
} ;
void Student::input() //输入学生信息函数
{
cout<<"\n\t\t请输入:"<<endl<<endl ;
cout<<"\t\t姓名:" ;
cin>>name ;
cout<<"\t\t学号:" ;
cin>>id ;
cout<<"\t\t数学成绩:" ;
cin>>math ;
cout<<"\t\t语文成绩:" ;
cin>>chinese ;
cout<<"\t\t英语成绩:" ;
cin>>english ;
sum = math + chinese + english ;
}
void Student::ReadFile(istream & in) //读取文件
{
in>>name>>id>>math>>chinese>>english>>sum ;
}
void Student::show() //输出学生信息
{
cout<<" |"<<setw(8)<<name<<" |"<<setw(6)<<id<<" |"<<setw(6)<<math<<" |"<<setw(6)<<chinese<<" |"<<setw(6)<<english<<" |"<<setw(7)<<sum<<" |"<<endl ;
cout<<"
|----------|----------|----------|----------|----------|----------|\n " ;
}
class StudentMassage //定义学生信息类,包含各项处理功能
{
public:
StudentMassage() ;
~StudentMassage() ;