Hi I am working on a wage application with four options which are as follows:
Subtracts an amount from the shop bank account (The account is text file "shop"). You do not need to add the same amount to another account but you should record the transaction with a timestamp in a separate file. The application should prevent the account balance from becoming overdrawn.
List the five most recent transactions to the screen. If there haven’t yet been five transactions then list all of them.
Print the account name, number and current balance to the screen.
Exit the program.
I have completed 1,3 and 4 but I am completely stumped as to how to go about number 2. I was hoping someone would be able to point me in the right direction.
case 2:
cout << "Here are you're recent transactions" <<endl;
break;
case 3:
cout << "The account names is:" << name << endl;
cout << "The account number is:" << number << endl;
std::cout << "The current account balance is " << read_balance() << std::endl;
break;