初学者关于类的错误,求指导!!
题目:编写一个学生数据输入和显示程序,学生数据有编号、姓名、班号和成绩4项。要求将其中的编号、姓名和显示设计成一个类person,并作为学生数据操作类student的基类。试编写基类person和派生类student,并写出主程序运行它们。#include<iostream.h>
class person
{
protected:
long int number;
char name[10];
public:
person(int number,char name[10])
{
this->number=number;
this->name=name;
}
show()
{
cout<<"姓名:"<<name<<endle
<<"班号:"<<number<<endle;
}
}
class student:public person
{
public:float score;
int classnumber;
student(score,classnumber)
{
this->score=score;
this->classnumber=classnumber;
}
show()
{
cout<<"班号:"<<classnumber<<endle
<<"成绩:"<<score<<endle;
}
}
void main()
{
student A(90,1):person(2010104105,"小于");
A.person::show();
A.student::show();
}
哪里有错误,用vc++6.0 编译通不过!!