Thread: Editor Dev C++

  1. #1
    Registered User
    Join Date
    Apr 2005
    Posts
    5

    Editor Dev C++

    Hopefully this a simple question ? I'm using Dev C++ Editor . I'm write very basic program like ex"Hello world" the problem is when I go to complie & run the program, windows flash & goes aways, what command should I use, to make that windows stay on, so I can see my Hello World message.

    Thanks in advance for all the help. newb...... here

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,660
    Read the FAQ

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,366
    This is a frequently answered question, so you can search for more detailed solutions. The simple, standard solution is to add cin.get() at the end of your program (before any return statements) so that it waits for the user to press enter before continuing.

    If your program includes user input later, you may need to add cin.ignore() before the cin.get().

  4. #4
    Registered User
    Join Date
    Apr 2005
    Posts
    5
    Thank you very much dave, I really do appreciate it.

Popular pages Recent additions subscribe to a feed