We currently have this to end a game when the player wins or loses:
system ("pause");
exit (0);
Any other ways to perform this action?
This is a discussion on Any other ways to perform this function? within the C++ Programming forums, part of the General Programming Boards category; We currently have this to end a game when the player wins or loses: system ("pause"); exit (0); Any other ...
We currently have this to end a game when the player wins or loses:
system ("pause");
exit (0);
Any other ways to perform this action?
whats wrong with that? in a console it does the job, the way i always did it apart from that is request user to input a key to quit (or continue if you can loop to start again), or just ask them to press any key to exit, the program will pause until it gets a value from the keyboard.