-
Input Options.
I hav created a menu in DOS window.
IT looks like this
MAIN MENU
1.GAME
2.HIGHEST SCORES
3.EXIT
the code
Code:
main()
{
int option,result;
cout<<"MAIN MENU";
cout<<"\n1.Game";
cout<<"\n2.HIGHEST SCORES";
cout<<"\n3.EXIT";
cin>>option;
cin.get();
if(option==1)
{
result=system("game.exe");
cout<<result;
}
if(option==2)
{
result=system("highest.exe");
cout<<result;
}
if(option==3)
{
return 0;
}
what should i do to make sure the options are executed without the user pressing enter?
thanks in advance..
-
Check the FAQ for an answer to "How to read input without enter", perhaps?
--
Mats
-
What compiler are you using?
Implicit main is invalid in C++.