C++:编译银行管理系统(vector)

题目概述:
编译银行管理系统。
编译:
#include< iostream>
#include< fstream>
#include< vector>
#include< string>
using namespace std;
class BankAccount
{
public:
BankAccount() {};
BankAccount(int number, string name, double money, int phone);//构造函数
int renum() { return user_number; }
string renam() { return user_name; }
double remon() { return over_money; }
int repho() { return user_phone; }
void DisplayInformation();//展示账户信息
friend ostream& operator << (ostream& Out, BankAccount&p)
{
Out << "身份证; " << p.user_number << "姓名: " << p.user_name << "金额: " << p.over_money << "电话: " << p.user_phone ;
return Out;
}
int user_number;//账号
string user_name;//姓名
double over_money=0;//金额
int user_phone;//电话
};
vector v1;
BankAccount p[1000];
int number_temp;//账号`
string name_temp;//姓名
int phone_temp;//电话
void W_File();//打开输出文件
void DisplayAll();//展示全部账户信息
void CreateAccount();//开户
void Destroy();//销户
void DepoistMoney();//存钱
void WithdrawMoney();//取钱
void Find();//查询个人信息
void W_File()//打开输出文件,文件结尾写数据
{
ofstream outfile(“f1.dat”);
if (!outfile)
{
cerr << “此文件无效!” &l

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值