//Print a menu of options to the user.
std::cout << "\n(1) Add Account\n";
std::cout << "(2) Delete Account\n";
std::cout << "(3) Print Accounts\n";
std::cout << "(4) Deposit\n";
std::cout << "(5) Withdrawal\n";
std::cout << "(6) Exit\n";
std::cout << "\nEnter selection: ";
//Start your main program loop here.
//All class functions are called through a BankingSystem object.
std::cout << "\n*** Welcome to the Banking System ***\n";
std::cin >> selection;
while ( selection !=6 )
switch ( selection )
std::cout<< "Incorrect selection.\nPlease enter a number between 1 and 5 or 6 to exit\n";
as vlad alluded to, put the input (line 37) just inside the while loop. Also, you probably want to put the PrintMenu function call at the start of the while loop as well, or else it's going to display after you select 6.