Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. void TransactionList::getTransactionsUpToDate(const Date& date, TransactionList& trl, TransactionList& returnTRL) const {
  2.  
  3.  
  4.     // Recursive Version
  5.     if (trl.size() != 0){
  6.  
  7.         Transaction aTransaction = trl.newestTransaction();
  8.  
  9.         if (aTransaction.getDate() < date || aTransaction.getDate() == date)
  10.         {
  11.             returnTRL.addNewTransaction(aTransaction);
  12.         }
  13.  
  14.         trl.deleteFirstTransaction();
  15.  
  16.         getTransactionsUpToDate(date, trl, returnTRL);
  17.     }
  18.  
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement