Any other ways to perform this function?

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 ...

  1. #1
    Registered User
    Join Date
    Dec 2009
    Posts
    1

    Any other ways to perform this function?

    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?

  2. #2
    Registered User rogster001's Avatar
    Join Date
    Aug 2006
    Location
    Liverpool UK
    Posts
    1,438
    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.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 4
    Last Post: 05-13-2011, 09:28 AM
  2. Compiling C in Visual Studio 2005
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-16-2009, 04:25 AM
  3. dllimport function not allowed
    By steve1_rm in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2008, 04:33 AM
  4. <Gulp>
    By kryptkat in forum Windows Programming
    Replies: 7
    Last Post: 01-14-2006, 01:03 PM
  5. C++ compilation issues
    By Rupan in forum C++ Programming
    Replies: 1
    Last Post: 08-22-2005, 06:45 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21