这样添加的医生信息,删除函数怎么写
void Doctor::input() {
char t;
cout<<"主治医生基本信息"<<endl;
fstream outfile("D:\\aa.txt",ios::out|ios::app);//以写的方式 打开文件
if(!outfile)
cout<<"打开文件失败"<<endl;
else
{
cout<<"姓名:";
cin>>name;
outfile<<name<<" ";
cout<<"性别:";
cin>>sex;
if(sex=='M'|sex=='m')
outfile<<"男"<<" ";
else if(sex=='f'|sex=='F')
outfile<<"女"<<" ";
else
{
cout<<"请重新输入性别:"<<endl;
cin>>sex;
if(sex=='M'|sex=='m')
outfile<<"男"<<" ";
else if(sex=='f'|sex=='F')
outfile<<"女"<<" ";
}
cout<<"年龄";
cin>>age;
outfile<<age<<" ";
cout<<"诊费";
cin>>office_vist_fees;
outfile<<office_vist_fees<<" ";
cout<<"专业说明";
cin>>specially;
outfile<<specially<<" ";
outfile.close();
}
cout<<"是否继续添加医生信息(y|n)"<<endl;
cin>>t;
if(t=='y')
input();
else
return ;
}