i assume you didn't see the pinned post "console closing down" on top of this forum.
it has 7 pages of discussion about this question.
i didn't read it, but 7 pages must have a convenient answer, besides, it's pinned. http://www.cplusplus.com/forum/beginner/1988/