欢迎来到天天文库
浏览记录
ID:19437391
大小:39.50 KB
页数:14页
时间:2018-10-02
《客户信息管理系统》由会员上传分享,免费在线阅读,更多相关内容在应用文档-天天文库。
1、客户信息管理系统#include#include#include#include//可以运用EXIT函数#includestaticintn=0;floattotalmoney=0;voidprint();//定义一个客户类classwork{//私有成员其中包括客户号、姓名、年龄、工作、入会时间、性别、地址、入会资金private:unsignedintsno;//编号intage;//年龄charna
2、me[20];//姓名charworks[15];//工作inttimes;//时间floatmoney;//入会资金charsex;//性别intvalue;//共有成员public:voidgetdata()//录入客户信息函数{value=1;cout<<"客户号姓名性别年龄工作入会资金入会时间:";cout<<'';cin>>sno>>name>>sex>>age>>works>>money>>times;}voiddisplay();int&get_value()//函数返回值为引用时,可以修改函
3、数返回值。{returnvalue;}unsignedintget_sno()//得到客户号{returnsno;}char*get_name()//得到客户姓名{returnname;}float&get_money()//得到客户资金{returnmoney;}intget_times()//得到客户时间{returntimes;}intget_age()//得到客户年龄{returnage;}};voidwork::display()//输出客户信息函数{cout<<"输出信息:"<<'';if(ge
4、t_value()==1){cout<5、out<<"客户号为"<>n;for(inti=1;i<=n;i++6、){cout<<"第"<7、o));while(infile){Two.display();infile.read((char*)&Two,sizeof(Two));};infile.close();}//按客户号查询voidFind1(){inti=1;floatmoney;workThree;ifstreaminput("work.text",ios::in);if(!input){cerr<<"Can'texportfromwork.text."<8、:";cin>>sno;input.read((char*)&Three,sizeof(Three));while(input){if(Three.get_sno()==sno){cout<<"输出查询结果:"<
5、out<<"客户号为"<>n;for(inti=1;i<=n;i++
6、){cout<<"第"<
7、o));while(infile){Two.display();infile.read((char*)&Two,sizeof(Two));};infile.close();}//按客户号查询voidFind1(){inti=1;floatmoney;workThree;ifstreaminput("work.text",ios::in);if(!input){cerr<<"Can'texportfromwork.text."<8、:";cin>>sno;input.read((char*)&Three,sizeof(Three));while(input){if(Three.get_sno()==sno){cout<<"输出查询结果:"<
8、:";cin>>sno;input.read((char*)&Three,sizeof(Three));while(input){if(Three.get_sno()==sno){cout<<"输出查询结果:"<
此文档下载收益归作者所有