求助???高手帮帮我
#include<iostream.h>#include<string.h>
class Student
{
protected:
int no;
char name[10];
float math,cpp;
static int count;
static float msum,csum;
Student*next;
public:
Student(){}
Student(int,char *,float,float,Student*=NULL);
float sum(){return math+cpp;}
void show1()
{
cout<<no<<'\t'<<name<<'\t'<<math<<'\t'<<cpp<<'\t'<<sum()<<endl;}
static void show2()
{
cout<<(msum/count)<<'\t'<<(csum/count)<<endl;
}
friend class stulist;
};
Student::Student(int mo,char*name,float math,float cpp,Student*next)
{
this->no=no;
strcpy(this->name,name);
this->math=math;
this->cpp=cpp;
this->next=next;
count++;msum+=math;;csum+=cpp;
}
class stulist
{
Student*head;
public:
stulist(){head=NULL;}
~stulist();
void create();
void print()const;
};
stulist::~stulist(){
Student*p;
while(head){
p=head;head=head->next;delete p;
}
}
void stulist::cteate(){
Student*p1,*p2;
int no;
char name[10];
float math,cpp;
cout<<"输入学号,-1表示结束";
cin>>no;
while(no!=-1){
cout<<"输入姓名及数学·c++语言成绩";
cin>>name>>math>>cpp;
p1=new Student(no,name,math,cpp);
if(!head){head=p1;p2=p1;}
else{p2->next=p1;p2=p1;}
cout<<"输入学号,-1表示结束";
cin>>no;
}
}
void stulist::print()const
{
Student*p=head;
cout<<"学号\t姓名\t数学\tc++语言\t总分\n";
while(p){p->show1();p=p->next;}
cout<<"";
Student::show2();
}
int Student::count;
float Student::cpunt;
float Student::msum,Student::csum;
void main()
{
stulist li;
li.create();
li.print();
}
哪位高手帮我看看 那里有错误呀