VS 2005: problems with running C++ programs
Hi, I want to run the simplest possible C++ program (Hello World) on VS 2005 . When I build it I receive no errors, but I do not see the output on the command line. I tried other short programs and it is still not working. Do you have ideas how to fix this problem? thanx
Hi,
The purpose of the "scanf" is to stop the program from exiting after it prints "Hello world" because it's waiting an input from the keyboard.
If you run the program from within the IDE and without the "scanf", the program prints "Hello world" then prints, "Press any key to continue..."
But if you run the program by double-clicking the resulting stand-alone ".exe" file (and without opening a DOS console), it runs within a split second then exits. That's why you don't see any output.