I'm writing C++ console programs. After compilation, when I run the program from my file browser, cmd.exe automatically closes such that I can't see my programs output.
The only way to work around this I've found is to run the program from inside cmd.exe
Is there anyway to keep cmd.exe open after a program finishes running?
Is there a setting I can change somewhere? I don't want to run a batch script with cmd.exe /K
Thanks!
[Edit] Don't know if this matters, but I'm on Vista x64
You can setup a shortcut with the /K switch when launching cmd.exe to have it not terminate after running a given command:
cmd.exe /K YourProgram.exe
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With