0

Hi every one i have a problem with this program the conslo window disappear automatically without waiting , Im using return 0; function but it does not work

4
Contributors
4
Replies
35
Views
4 Years
Discussion Span
Last Post by saharsweeto
0

This thread discusses it at length:
http://www.cplusplus.com/forum/beginner/1988/

The first suggestion, to have

 std::cout << "Press ENTER to continue...";
  std::cin.ignore( std::numeric_limits<std::streamsize>::max(), '\n' );

right before your

return 0;

should be fine. This solution requires you to#include <limits> and #include <iostream>. There are many, many more solutions.

Edited by Moschops

0

Please do not hijack existing threads with unrelated questions like this; in the future, start your own thread. In any case, the question is too broad, and has too many unknowns (regarding your state of knowledge, the context in which the question comes up, etc.) to be easily answered; it also comes across as a homework problem, and while we are willing to help you solve your homework, we won't do it all for you.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.