accountlist.cpp

来自「是银行atm机的基本功能实现」· C++ 代码 · 共 44 行

CPP
44
字号
// AccountList.cpp: implementation of the AccountList class.
//
//////////////////////////////////////////////////////////////////////

#include "stdafx.h"
#include "AccountList.h"

//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////

AccountList::AccountList()
{

}

AccountList::~AccountList()
{

}

void AccountList::AddAccount(Account *pAccount)
{
	AddTail(pAccount);
}

void AccountList::DeleteAccount(Account *pAccount)
{
	//到目前为止不支持删除用户
	//保留接口以备后用
}

Account * AccountList::GetAccountByID(int id)
{
	int iCount=GetCount();
	for(int i=0;i<iCount;i++){
		Account *pAccount = (Account *)FindIndex(i);
		if(pAccount->GetID()==id){
			return pAccount;
		}
	}
	return NULL;
}

⌨️ 快捷键说明

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