I keep getting an error here and cant quite figure out why, can someone help me please
Code:
else if (mainMenu == 3){
cout << "Please make a selection" << endl
<< " 1) Withdraw from account" << endl
<< " 3) Back to main menu" << endl;
cin >> withdrawMenu;
if (withdrawMenu == 1){
cout << "Please Enter sum you wish to withdraw from account" << endl;
cin >> withdraw;
if ( withdraw > balance){
cout << "Value Exceeds Current balance Please enter new amount\n" << endl;
cin >> withdraw;
cout << " You Have Withdrawn " << withdraw << " From your Accout" << endl;
balance = balance - withdraw;
cout << " Balance is now " << balance << endl;
}
else {
cout << " You Have Withdrawn " << withdraw << " From your Accout" << endl;
balance = balance - withdraw;
cout << " Balance is now " << balance << endl;
}
else if (withdrawMenu != 3) //<<<<<<<<<<<<here
{
cout << "Invalid entry. Try again" << endl;
}
} while (withdrawMenu != 3);
}
else if (mainMenu != 4)
{
cout << "Invalid entry. Try again \n\n";
}
} while (mainMenu != 4);
return 0;
}