English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm new to C++, please help.

Here is my code. When I run it, the window disappears right away. How can the "Press any key to exit" appears?

#include

using namespace std;

int main()
{
cout << "Hello world.";

return 0;
}

2006-09-04 09:54:43 · 1 answers · asked by Anonymous in Computers & Internet Programming & Design

1 answers

obviously it will because you do not have any pause, use getch() after cout<<"hello world";

Getch will wait until user presses any key then exits.

2006-09-04 10:43:13 · answer #1 · answered by Manish 5 · 0 0

fedest.com, questions and answers