ref.cpp

来自「一个模仿ATM提款机的MFC程序」· C++ 代码 · 共 40 行

CPP
40
字号
// Ref.cpp: implementation of the Ref class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "atm.h"
#include "Ref.h"
#include <fstream.h>
#include "string.h"
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif

//////////////////////////////////////////////////////////////////////
// 往文件中输出交易记录
//////////////////////////////////////////////////////////////////////
/*

Ref::Ref()
{

}

Ref::~Ref()
{

}*/

void Ref::Refresh(CString Accnt,double Balance,double money,CString type){
	ofstream ofile("交易记录.txt",ios::ate);
	ofile<<Accnt<<endl;
	ofile<<Balance<<endl;
	ofile<<money<<endl;
	ofile<<type<<endl;
	ofile.close();

}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?