请教:VC++程序错于何处?

来源:百度知道 编辑:UC知道 时间:2024/06/24 06:55:25
#include <iostream.h>
class day
{
public :
day(int y,int m,int d)
{
year=y;
month=m;
date=d;
}
void showday()
{
cout<<"他的生日是: "<<year<<","<<month<<","<<date<<endl;
}
private :
int year,month,date;
};

class employee
{
public :
employee(char s,int n,int st,day birth);
~employee(){};
void show();
private :
char sex;
int num;
int statuenum;
day birthday;
};

employee::employee(char s,int n,int st,day birth):birthday(birth)
{
sex=s;
num=n;
statuenum=st;
birthday=birth;
}

void employee::show()
{
cout<<"性别:"<<sex<<endl;
cout<<"编号:"<<num<<endl;
cout<<"生日:";birthday.showday()<<endl;
cout<<"身

#include <iostream.h>
class day
{
public :
day(int y,int m,int d)
{
year=y;
month=m;
date=d;
}
void showday()
{
cout<<"他的生日是: "<<year<<","<<month<<","<<date<<endl;
}
private :
int year,month,date;
};

class employee
{
public :
employee(char s,int n,int st,day birth);
~employee(){};
void show();
private :
char sex;
int num; //此处用了中文的分号
int statuenum;
day birthday;
};

employee::employee(char s,int n,int st,day birth):birthday(birth)
{
sex=s;
num=n;
statuenum=st;
birthday=birth;
}

void employee::show()
{
cout<<"性别:"<<sex<<endl;
cout<<"编号:"<<num<<endl;
cout<<"生日:";
birthday