//按姓名查询医生信息Р?~doctor() {}Р};Рclass HuanZhe : public person //患者类Р{Рprivate:Р?double drug_fee; Рpublic:Р?HuanZhe(){}Р?void input() ; //增加患者信息Р?void zhangdanKind(); //按姓名查询患者信息Р?~HuanZhe() {}Р};Рclass zhangdan //帐单类Р{Р?string name;Р?double drug_fee;Р?double office_vist_fee;Р?double totl_fee;Рpublic:Р?zhangdan() { }Р?void totl_pay() ; //用于把总费用从"D:\\bb.txt"文件移到"D:\\cc.txt"Рvoid pay() ; //实现统计所有患者总费用Р?void zhangdanKind() ;//按姓名查询账单信息Р?~zhangdan() {}Р};Р4.2 函数实现Рclass doctor : public person //医生类Р{Рprivate:Р?char speicialty[15];Рpublic:Р?doctor() {}Р?void 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;