wierd C++ "error?"
Miscellaneous Forums/General Discussion/wierd C++ "error?" Yes, the console window is closed when the program ends. run it from the console command window.
ehh...what exactly is the console command window?
/noob
/noob
Start > Run > type "cmd"
EDIT: For Windows. :)
EDIT: For Windows. :)
how can I make it so the program waits for any key to be pressed, then continue?
I think you can use getch(); can't remember if it is in iostream or conio though...long time no C++ programming here ^^
getch() isn't a command according to visual C++ 2008
ok, that works well enough, thanks
An alternative would be to open the command prompt, call "CD" till you get to your .exe's directory, then just call:
Yourexesname.exe
and the window won't vanish
Yourexesname.exe
and the window won't vanish
Interesting, turns out getch() is 'non standard' ^^
Another alternative is calling system("PAUSE")