0

I have problem when i Run my program .I can't see the results clearly it turns to fast to see, and it goes back to my program. Do you know how to solve this?please...

6
Contributors
6
Replies
9
Views
6 Years
Discussion Span
Last Post by renish khunt
0

add a line at the end of main() to make the program want for you to press a key

int main()
{
   <snip> // your code goes here
   getchar(); // wait
}
0

Or, maybe, in a more C++-ish way:

#include <iostream>

int main()
{
    ... // your code here
    std::cin.get();
}
0

or press alt + F5 or from menu windows->output after running your program to see the output. But the above two posts are the best ones to make output screen wait.

Edited by Arbus: n/a

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.