Alex Rivera | Logout

Console pause in C++?

Asked 2010-12-03T08:41:56.097
23

In C# you can cause the console to wait for a character to be input (which is useful for being able to see the last outputs of a console before the program exits). As a beginner in C++, i'm not sure what the equivalent is. Is there one?

Edit
Report

1 Answer

3

There is nothing in the standard, and nothing cross-platform. The usual method is to wait for <Enter> to be pressed, then discard the result.

answered 2010-12-03T08:44:06.910

Your Answer