|The problem is Windows will close the application's console window as soon as it exits. As it just prints a single line and returns, your output flashes by faster than you can see. |
There are workarounds.
• The most popular is to use Visual Studio, as running a console program without debugging will keep the console window up. Check to see if your IDE has such a feature, or can emulate it with "cmd /k". If not, consider a better IDE.
• Add a breakpoint before the program's exit. Ideally on main()'s return.
• Just before the program exits, add a line:
system("pause"); • If all else fails, run your program from the Command Prompt.
How To Ask Questions The Smart Way
message edited by Razor2.3