请教关于C++派生类的问题
程序代码:
#include<iostream> using namespace std; class person //人员类 { protected: int age ; char* name; public: person(int a,char n[10]); }; person::person(int a,char n[10]) //构造函数的实现 { age=a; name=n; } class date //日期类 { private: int year; int month; int day; public: date(int a,int b,int c); void show(); }; date::date(int a,int b,int c) //构造函数的实现 { year=a; month=b; day=c; } void date::show() //实现show { cout<<year<<"-"<<month<<"-"<<day<<endl; } class student:public person //学生类 { private: date birthday; int ID; int score; public: student(char n[10],int a,int b,int c,int d,int e,int f); void display(); }; student::student(char n[10],int a,int b,int c,int d,int e,int f):person(a,n[10]),birthday( b, c, d) //构造函数的实现 { ID=e; score=f; } void student::display() //实现display { cout<<"Student's ID: "<<ID<<endl; cout<<"Student's name: "<<name<<endl; cout<<"Student's birthday :"; birthday.show(); cout<<endl; cout<<"Student's score: "<<score<<endl; } 问题出在红色的那一行,error C2664: “person::person(int,char [])”: 不能将参数 2 从“char”转换为“char []” 请问要怎么改