How to pause a program in C++

May 4, 2009 at 5:11am
Hi,

I want to pause a program in C++ until I press a key to continue. Could anyone please help me how to do that.

Thank you so much
May 4, 2009 at 6:50am
closed account (S6k9GNh0)
Though I do disagree in giving answers away like this:

getchar();

There you go.
May 4, 2009 at 6:52am
which platform you are developing?
May 4, 2009 at 9:25am
May 4, 2009 at 3:43pm
simply add the line
system("PAUSE");
May 4, 2009 at 3:51pm
There's also this pretty lengthy thread on the subject: http://www.cplusplus.com/forum/beginner/1988/
May 4, 2009 at 4:19pm
I thank all of you who have posted their advices
May 4, 2009 at 7:48pm
@kaidranzer
Eat bugs and die.
May 5, 2009 at 12:40am
closed account (L3ApX9L8)
I suggest you read the thread pointed by helios...
quite informative discussion...
Topic archived. No new replies allowed.