⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 account.cpp

📁 MFC写的银行储蓄系统
💻 CPP
字号:
#include "stdafx.h"
#include "银行储蓄系统.h"
#include "银行储蓄系统Dlg.h"

#include "Account.h"

Account* Account::pFirst=0;        //链表为空
int Account::count=0;          //帐户个数为0

Account::Account(int accNo, double bal)
{
  acntNumber=accNo;
  balance=bal;
  count++;
  if(!pFirst)
    pFirst=this;
  else
  {
    for(Account* pS=pFirst; pS->pNext ; pS=pS->pNext); //找到最后一个结点
    pS->pNext=this;
  }
  pNext=NULL;
}

void Account::Deposit(double amount)//存款
{ 
	balance+=amount;   
}


int Account::AccountNo() { return acntNumber; }

double Account::GetBalance() { return balance; }

Account*& Account::getFirst(){ return pFirst; }

Account*& Account::getNext(){ return pNext; }

int& Account::NoAccounts() { return count; }

Account::Password(long pass) { password=pass; }

long &Account::getPass() { return password; }

⌨️ 快捷键说明

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