I'm a bit of a noob when it comes to VC++ been trying to pick it up over the past few days through some interesting tutorials. Anyways....my problem should (hopefully) be a very simple one. Im trying out a couple of simple programs of the HelloWorld flavour (you know, the basics) and I'm compiling them through VIsual Studio 2005. The problem is that post compilation the command window just auto closes (thats command as in command.exe or cmd.exe however the program actually being run is the exe for my code, obviously) I was wondering if it was possible to make the window stay open long enough for me to actually read the output with the Press Any Key to Continue dialogue before it closes.
Thanx.
Brokenlynx
PS: Ive already tried unchecking "close on exit" in %WINDIR%/_default.pif only seems to affect use of the 'exit' command on the command line. Any other ideas

Automatic closing of command window
Mike Walker
Thanx for that I think the breakpoint method is probably the best way to go about it....mods can close this now. Thx for the help!
Brokenlynx
rr_dot_net
Try hitting Ctrl + F5 :)
Is this waht you were looking for
Shahid Mahmood
Hi: you can add a system call to pause at the end of your program: this should have the desired effect:
#include
<stdio.h>#include <stdlib.h>
int
main(){
printf("Hello World\n");
system("pause");
}
dreadjr
OoLee