#include
#include
using namespace std;
int main()
{
ofstream worker;
worker.open("g:\编程\worker.dat",ios::out|ios::binary);
int i;
cout<<'?'<
cin>>i;
while(i)
{
char name[30],telephone[30],mail[30],stdress[30];
int code,i;
if(!worker)
{
cout<<"error"<
abort();
}
cout
cin>>name;
worker.write((char*)&name,sizeof(int));
cout<<"code"<
cin>>code;
worker.write((char*)code,sizeof(int));
cout<<"telephone"<
cin>>telephone;
worker.write((char*)&telephone,sizeof(int));
cout<<"mail"<
cin>>mail;
cout<<"stdress"<
cin>>stdress;
worker.write((char*)&stdress,sizeof(int));
cout.flush();
cout<<'?'<<endl;
cin>>i;
}
worker.close();
getchar();
return 0;
}