Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Account* CreateAccount(const Customer& holder, const string& number, const string& date,
- const double& balance, const double& deposit, const double& withdraw)
- {
- Account* a = new Account;
- a->Holder = holder;
- a->AccountNo = number;
- a->Balance = balance;
- a->TotalDeposit = deposit;
- a->TotalWithdrawal = withdraw;
- a->TransactionList[a->TransactionCount++] = *CreateTransaction(date, "Opening balance", balance);
- return a;
- delete a;
- a = NULL;
- Transaction* CreateTransaction(const string& date, const string& description, const double& amount)
- {
- return new Transaction{ date, description, amount };
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement