fork download
  1. #include<iostream>
  2. #include<conio>
  3. #include<string>
  4. #include<math>
  5.  
  6. using namespace std;
  7.  
  8. int StartGame()
  9. {cout<<"You chose StartGame "<<endl;}
  10. int LoadGame ()
  11. {cout<<"You chose LoadGame "<<endl;}
  12. int MultiPlayer()
  13. {cout<<"You chose MultiPlayer "<<endl;}
  14. int Exit()
  15. {cout<<"Thank You for playing "<<endl;}
  16. int main()
  17. {
  18. int input;
  19. cout<<"What do you want to choose : "<<endl;
  20. cout<<"1. StartGame"<<endl;
  21. cout<<"2. LoadGame"<<endl;
  22. cout<<"3. MultiPlayer"<<endl;
  23. cout<<"4. Exit"<<endl;
  24. cin>>input;
  25. bool Variable;
  26. int VarChar;
  27. Variable = False;
  28. do
  29. {
  30. switch (input)
  31. {
  32. case '1':
  33. StartGame();
  34. break;
  35. case '2':
  36. LoadGame();
  37. break;
  38. case '3':
  39. MultiPlayer();
  40. break;
  41. default:
  42. cout<<"Wrong Entry."<<endl;
  43. break;
  44. }
  45. }while(Variable == True);
  46. cout<<"Do you want to choose again : y/n "<<endl;
  47. cin>>VarChar;
  48. if(VarChar == 'y')
  49. {
  50. Variable = True;
  51. }
  52. elseif(VarChar == 'n')
  53. {
  54. Variable = False;
  55. }
  56. else
  57. {
  58. Exit();
  59. }
  60.  
  61. return 0;
  62. }
  63.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:2:16: fatal error: conio: No such file or directory
 #include<conio>
                ^
compilation terminated.
stdout
Standard output is empty