Editor Dev C++

This is a discussion on Editor Dev C++ within the C++ Programming forums, part of the General Programming Boards category; Hopefully this a simple question ? I'm using Dev C++ Editor . I'm write very basic program like ex"Hello world" ...

  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 wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,452
    Read the FAQ

  3. #3
    Registered User
    Join Date
    Jan 2005
    Posts
    7,317
    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

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