#include<iostream>
#include<stdlib.h>
#include<string.h>
using namespace std;
int main()
};
operater ope1;
operater ope2;
/* cout<<"请输入操作员的信息"<<endl;
cout<<"请输入操作员的编号"<<endl;
cin>>ope1.id;
cout<<"请输入操作员的名字"<<endl;
cin>>ope1.szname;
cout<<"请输入操作员的性别"<<endl;
cin>>ope1.szsex;
*/
ope1.id=1;
ope1.szname="晓明";
ope1.szsex="男";
ope2=ope1;
cout<<ope1.id<<","<<ope1.szname<<","<<ope1.szsex<<"."<<endl;
cout<<ope2.id<<","<<ope2.szname<<","<<ope2.szsex<<".";
cin.get();
cin.get();
return 0;
}
#include<stdlib.h>
#include<string.h>
using namespace std;
int main()
{
//定义一个操作员的结构体
struct operater{
//操作员的编号
int id;
//操作员的名字
string szname;
//操作员的性别
string szsex;};
operater ope1;
operater ope2;
/* cout<<"请输入操作员的信息"<<endl;
cout<<"请输入操作员的编号"<<endl;
cin>>ope1.id;
cout<<"请输入操作员的名字"<<endl;
cin>>ope1.szname;
cout<<"请输入操作员的性别"<<endl;
cin>>ope1.szsex;
*/
ope1.id=1;
ope1.szname="晓明";
ope1.szsex="男";
ope2=ope1;
cout<<ope1.id<<","<<ope1.szname<<","<<ope1.szsex<<"."<<endl;
cout<<ope2.id<<","<<ope2.szname<<","<<ope2.szsex<<".";
cin.get();
cin.get();
return 0;
}