Advertisement
Guest User

Untitled

a guest
Mar 27th, 2015
250
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. Account* CreateAccount(const Customer& holder, const string& number, const string& date,
  2. const double& balance, const double& deposit, const double& withdraw)
  3. {
  4.  
  5. Account* a = new Account;
  6.  
  7. a->Holder = holder;
  8. a->AccountNo = number;
  9. a->Balance = balance;
  10. a->TotalDeposit = deposit;
  11. a->TotalWithdrawal = withdraw;
  12. a->TransactionList[a->TransactionCount++] = *CreateTransaction(date, "Opening balance", balance);
  13.  
  14. return a;
  15. delete a;
  16. a = NULL;
  17.  
  18. Transaction* CreateTransaction(const string& date, const string& description, const double& amount)
  19. {
  20. return new Transaction{ date, description, amount };
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement