using namespace std;
#include
#include
#include
struct Date{
short year,month,day;
};
struct Employee{
char num[5],name[20];
char sex;
Date birthday;
float salary;
};
Employee InputAnEmp(){
Employee Emp;
cin>>Emp.num>>Emp.name;
cin>>Emp.sex;
cin>>Emp.birthday.year>>Emp.birthday.month>>Emp.birthday.day;
cin>>Emp.salary;
return Emp;
}
void PrintADate(Date d){
cout<<d.year<<"."<<d.month<<"."<<d.day;
}
void PrintTittle(){
cout<<setw(5)<<"编号"<<setw(7)<<"姓名"<<setw(5)<<"性别";
cout<<setw(10)<<"出生日期";
cout<<setw(4)<<"工资";
}
void PrintAnEmp(Employee E){
cout<<setw(5)<<E.num<<setw(7)<<E.name<<setw(5)<<E.sex;
PrintADate(E.birthday);
cout<<setw(4)<<E.salary;
}
int mian(){
Employee e1={"01","张三",'m',1995,10,27,5000};
Employee e2;
e2=InputAnEmp();
PrintTittle();
PrintAnEmp(e1);
PrintAnEmp(e2);
return 0;
}
我用的是devc++ 给出的错误提示是:[Error] ld returned 1 exit status
请问这是什么情况 万分感谢