欢迎来到天天文库
浏览记录
ID:55160245
大小:37.00 KB
页数:5页
时间:2020-04-29
《c++图书-银行账户管理系统mis系统.doc》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、银行账户管理系统#include#include#include#includeusingnamespacestd;voidhandle_menu();intmenu_select();classaccount{protected:charnum[50];//帐号charname[20];//姓名charid[50];//身份证号doublemoney;//余额public:account(){}~account(){}voidsetnum(chars[]){strcpy(num,s);}char*g
2、etnum(){returnnum;}voidsetname(charn[]){strcpy(name,n);}char*getname(){returnname;}voidsetid(charidn[]){strcpy(id,idn);}char*getid(){returnid;}voidsetmoney(floatm){money=m;}doublegetmoney(){returnmoney;}voiddisp(){cout<<"t"<3、dl;}};classbankmanager{protected:vectorvaccount;public:bankmanager(){}~bankmanager(){}voidreadfile();voidwritefile();voidaddin();//开户voiddisplay();voidfind();//查询voiddel();//销户voidmodify();//修改voidsavemoney();//存款voiddelmoney();//取款};#include"banks.h"voidbankmanager::readfile(){ve4、ctor::iteratorp;p=vaccount.begin();ifstreamin("banks.txt",ios::in);accountac;while(in.read((char*)&ac,sizeof(ac))){*p=ac;p++;}in.close();}voidbankmanager::writefile(){ofstreamout("banks.txt",ios::out);for(inti=0;i5、i]));}out.close();}voidbankmanager::addin(){//readfile();charanum[50],aname[50],aid[50];doubleam;accounta;for(;;){cout<<"请输入账户息:"<6、.getline(aid,'');a.setid(aid);cout<<"t金额:";cin>>am;getchar();a.setmoney(am);vaccount.push_back(a);}writefile();}voidbankmanager::display(){readfile();cout<<"t"<<"帐号"<<"t"<<"姓名"<<"t"<<"身份证号"<<"t"<<"金额"<7、(){readfile();charanum[20];cout<<"t请输入查询的帐号:";cin.getline(anum,'');for(inti=0;i
3、dl;}};classbankmanager{protected:vectorvaccount;public:bankmanager(){}~bankmanager(){}voidreadfile();voidwritefile();voidaddin();//开户voiddisplay();voidfind();//查询voiddel();//销户voidmodify();//修改voidsavemoney();//存款voiddelmoney();//取款};#include"banks.h"voidbankmanager::readfile(){ve
4、ctor::iteratorp;p=vaccount.begin();ifstreamin("banks.txt",ios::in);accountac;while(in.read((char*)&ac,sizeof(ac))){*p=ac;p++;}in.close();}voidbankmanager::writefile(){ofstreamout("banks.txt",ios::out);for(inti=0;i5、i]));}out.close();}voidbankmanager::addin(){//readfile();charanum[50],aname[50],aid[50];doubleam;accounta;for(;;){cout<<"请输入账户息:"<6、.getline(aid,'');a.setid(aid);cout<<"t金额:";cin>>am;getchar();a.setmoney(am);vaccount.push_back(a);}writefile();}voidbankmanager::display(){readfile();cout<<"t"<<"帐号"<<"t"<<"姓名"<<"t"<<"身份证号"<<"t"<<"金额"<7、(){readfile();charanum[20];cout<<"t请输入查询的帐号:";cin.getline(anum,'');for(inti=0;i
5、i]));}out.close();}voidbankmanager::addin(){//readfile();charanum[50],aname[50],aid[50];doubleam;accounta;for(;;){cout<<"请输入账户息:"<6、.getline(aid,'');a.setid(aid);cout<<"t金额:";cin>>am;getchar();a.setmoney(am);vaccount.push_back(a);}writefile();}voidbankmanager::display(){readfile();cout<<"t"<<"帐号"<<"t"<<"姓名"<<"t"<<"身份证号"<<"t"<<"金额"<7、(){readfile();charanum[20];cout<<"t请输入查询的帐号:";cin.getline(anum,'');for(inti=0;i
6、.getline(aid,'');a.setid(aid);cout<<"t金额:";cin>>am;getchar();a.setmoney(am);vaccount.push_back(a);}writefile();}voidbankmanager::display(){readfile();cout<<"t"<<"帐号"<<"t"<<"姓名"<<"t"<<"身份证号"<<"t"<<"金额"<7、(){readfile();charanum[20];cout<<"t请输入查询的帐号:";cin.getline(anum,'');for(inti=0;i
7、(){readfile();charanum[20];cout<<"t请输入查询的帐号:";cin.getline(anum,'');for(inti=0;i
此文档下载收益归作者所有