帮忙看下哪错了,应怎样改?谢谢无限感谢!~

来源:百度知道 编辑:UC知道 时间:2024/06/01 07:59:22
帮忙看下哪错了,应怎样改?谢谢!~~
class Date
{
private:
int year,month,day;
public:
Date(int a,int b,int c)
{year=a;month=b;day=c;}

Date(Date &n)
{year=n.year;
month=n.month;
day=n.day;
}

int Getyear(){return year;}
int Getmonth(){return month;}
int Getday(){return day;}
};

class employee
{
protected:
int individualEmpNo;
char sex;
Date birthday;
char cardNo[20];
static int employeeNo;
public:
employee(Date xbirthday);
~employee();
void SetcardNo(char *);
char * GetcardNo();
int GetindividualEmpNo();
void Setsex(char p);
char Getsex();
};

#include<cstring>

int employee::employeeNo=1000;

employee::employee(Date xbirthday)
:birthday(xbirthday)
{individualEmpNo=employeeNo++;sex='\0';}

employee::~employee(){}

void employee::SetcardNo(char *Num

过了

class Date
{
private:
int year,month,day;
public:
Date(){year = month = day = 0;}
Date(int a,int b,int c)
{year=a;month=b;day=c;}

Date(Date &n)
{year=n.year;
month=n.month;
day=n.day;
}
void SetDate(int a,int b,int c)
{year=a;month=b;day=c;}

int Getyear(){return year;}
int Getmonth(){return month;}
int Getday(){return day;}
};

class employee
{
protected:
int individualEmpNo;
char sex;
Date birthday;
char cardNo[20];
static int employeeNo;
public:
employee(){}
employee(Date xbirthday);
~employee();
void SetcardNo(char *);
char * GetcardNo(){return (char*)cardNo;}
int GetindividualEmpNo(){return individualEmpNo;}
void Setsex(char p);
char Getsex();
};

#include<cstring>

int employee::empl