Pausing The Screen

This is a discussion on Pausing The Screen within the C++ Programming forums, part of the General Programming Boards category; How do I pauses the screen after my program is done? I think it's called " system("PAUSE") " it makes ...

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    2

    Pausing The Screen

    How do I pauses the screen after my program is done?
    I think it's called " system("PAUSE") " it makes a line in the screen that says " press any key to continue".

    Thanx


  2. #2
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    Here it is:

    Code:
    #include <cstdlib>
    
    using namespace std;
    
    int main()
    {
        system("pause"); // Also works with 'PAUSE'.
        return 0;
    }
    The word rap as it applies to music is the result of a peculiar phonological rule which has stripped the word of its initial voiceless velar stop.

  3. #3
    Hamster without a wheel iain's Avatar
    Join Date
    Aug 2001
    Posts
    1,385
    a better way to do it (system calls are slow and unoptomised)

    is include conio.h

    and use

    cout<<"press any key to proceed";
    int wait = getch(); //pauses until keypress
    //rest of your code
    Monday - what a way to spend a seventh of your life

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Feedback: Functional Specification Wording
    By Ragsdale85 in forum C++ Programming
    Replies: 0
    Last Post: 01-18-2006, 03:56 PM
  2. pausing screen in mac osx
    By hostensteffa in forum C++ Programming
    Replies: 1
    Last Post: 10-23-2005, 01:54 AM
  3. char copy
    By variable in forum C Programming
    Replies: 8
    Last Post: 02-06-2005, 09:18 PM
  4. i am not able to figure ot the starting point of this
    By youngashish in forum C++ Programming
    Replies: 7
    Last Post: 10-07-2004, 02:41 AM
  5. Converting from Screen to World Coordinates
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 05-11-2004, 12:51 PM

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