C++ - Creating a menu (menuOption) - Need assistance in creating a menu that opens up an entirely new menu once the user inputs the appropriate value (range is 0 to 13). - The main photo shows how the initial menu should look like and each title has its own value assigned to it. Also, in the bottom of the photo is "Option : " and there, the user is suppose to input a value that will open up one of the menus. - So if the user inputs 3, then a completely new menu populates on the user's screen (please review photo number two). And in this new populated screen it is title "3. Drop Lowest Score." There is a line below the title and under that line the user is suppose to perform an action but I have yet to create code for that (hence is why I have "case #: Challenge#(); break;"). - But if the user inputs a value that is not within the range OR a letter, then below "Option : " (on the main menu) the program must state an error message such as the following: Option : 14 ERROR - Invalid option. Please re-enter. Option: So far I have the following on my Visual Studio: int main() { do { switch (menuOption()) { case 0: exit(1); break; case 1: Challenge1(); break; case 2: Challenge2(); break; case 3: Challenge3(); break; case 4: Challenge4(); break; case 7: Challenge7(); break; case 8: Challenge8(); break; case 9: Challenge9(); break; case 10: Challenge10(); break; case 11: Challenge11(); break; case 12: Challenge12(); break; default: cout << "\t\tERROR - Invalid option. Please re-enter."; break; } cout << "\n"; system("pause"); } while (true); return EXIT_SUCCESS; } So to sum it up, I just need assistance on having my initial menu open up an entirely new menu depending on what value the user inputs (ranging from 0 to 13)
C++ - Creating a menu (menuOption)
- Need assistance in creating a menu that opens up an entirely new menu once the user inputs the appropriate value (range is 0 to 13).
- The main photo shows how the initial menu should look like and each title has its own value assigned to it. Also, in the bottom of the photo is "Option : " and there, the user is suppose to input a value that will open up one of the menus.
- So if the user inputs 3, then a completely new menu populates on the user's screen (please review photo number two). And in this new populated screen it is title "3. Drop Lowest Score." There is a line below the title and under that line the user is suppose to perform an action but I have yet to create code for that (hence is why I have "case #: Challenge#(); break;").
- But if the user inputs a value that is not within the range OR a letter, then below "Option : " (on the main menu) the program must state an error message such as the following:
Option : 14
ERROR - Invalid option. Please re-enter.
Option:
So far I have the following on my Visual Studio:
int main()
{
do
{
switch (menuOption())
{
case 0: exit(1); break;
case 1: Challenge1(); break;
case 2: Challenge2(); break;
case 3: Challenge3(); break;
case 4: Challenge4(); break;
case 7: Challenge7(); break;
case 8: Challenge8(); break;
case 9: Challenge9(); break;
case 10: Challenge10(); break;
case 11: Challenge11(); break;
case 12: Challenge12(); break;
default: cout << "\t\tERROR - Invalid option. Please re-enter."; break;
}
cout << "\n";
system("pause");
} while (true);
return EXIT_SUCCESS;
}
So to sum it up, I just need assistance on having my initial menu open up an entirely new menu depending on what value the user inputs (ranging from 0 to 13)



Trending now
This is a popular solution!
Step by step
Solved in 4 steps with 2 images









