I'm not telling you to actually type it that exact code. What I am saying is you can create another function named whatever you want to call it and then invoke it for each switch case. Think of it as a sub-menu that will be called when the first menu is fulfilled. The argument (UserSelection) is being passed to the sub-menu function you create in case you need it. Otherwise you don't have to have a signature(argument) for the sub-menu function.
In the case of menu(UserSelection) , it is a function being called that would contain another sub-menu. You would need to create the function, but it would look something like this.
1 2 3 4 5 6 7
void menu(const string&); // Function Prototype, don't include a signature if you dont need it
void menu(const string& selection)
{
// create another menu here
}
int myCaseOneMenu(UserSelection)
{
//THIS IS A MENU
// CHOOSE A NUMBER
return UserSelection;
}
//---
cout << "Select a team" << endl;
cin >> UserSelection;
switch (UserSelection)
{
case 1:
cout << "New England Patriots selected" << endl;ยด
myCaseOneMenu(UserSelection);
switch (UserSelection);
case 1:
case 2:
case 3:
break;
case 2:
cout << "Buffalo Bills selected" << endl;
break;
case 3:
cout << "New York Jets selected" << endl;
break;
case 4:
cout << "Miami Dolphins selected" << endl;
break;