cashregisterimp.cpp
来自「data+structures+using+c的源码」· C++ 代码 · 共 25 行
CPP
25 行
#include <iostream>
#include "cashRegister.h"
using namespace std;
int cashRegister::currentBalance()
{
return cashOnHand;
}
void cashRegister::acceptAmount(int amountIn)
{
cashOnHand += amountIn;
}
cashRegister::cashRegister(int cashIn)
{
if(cashIn >= 0)
cashOnHand = cashIn;
else
cashOnHand = 500;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?