Click to See Complete Forum and Search --> : Can't see the Cosole window


nicoletonyf
October 9th, 2004, 11:08 PM
Hello there, I just installed Visual Studio.net 2003 last week.
When I try to start my program, the console appears and closes as
soon as the program ends. What is the setting to keep the console
open, so I can see if my program works? Thanks Nicole

Andreas Masur
October 9th, 2004, 11:16 PM
Well...I assume you run your program out of the debugger...thus, the window will close as soon as the program terminates...there are several ways around it...

Run the release version (CTRL+F5) instead...it should cause the console window waiting for a keypress.
Run your application without the debugger from a command shell.
Add the following at the end of your program

#include <conio.h>

int main()
{
// Your code
_getch();
return 0;
}

It will wait for a keypress as well.