Here ill just edit this, sorry for double post but whatever
PHP Code:
#include <iostream>
using namespace std;
void ShowFirstOption();
void ShowSecondOption();
void ShowThirdOption();
int main()
{
int choice;
cout << "\tThis is a menu to pick choices" << endl;
cout << "1: This is option 1" << endl;
cout << "2: This is option 2" << endl;
cout << "3: This is option 3" << endl;
cout << "0: Exit" << endl;
cin >> choice;
/*if( choice < 0 || choice > 3 ) // dont really need to check this because the default case will handle it
{
exit(0);
}
else
{*/
switch(choice)
{
case 1: ShowFirstOption();
break;
case 2: ShowSecondOption();
break;
case 3: ShowThirdOption();
break;
default: exit(0);
break;
}
}
return 0;
}
void ShowFirstOption()
{
cout << "This is the first option" << endl;
}
void ShowSecondOption()
{
cout << "This is the second option" << endl;
}
void ShowThirdOption()
{
cout << "This is the third option" << endl;
}
__________________