| windows console app Is there a way a console app can query if it was run from inside a DOS box as opposed to being double clicked?
The reason is that I'm tired of putting getch() at the end of all my quick test programs to avoid the printed answers from not being seen. If I open a DOS box and run the app from there, no problems. But being lazy, if I double click to run it, it runs, prints out info, and closes. It would be nice to be able to detect and only put in the getch() if the app was double clicked.
Thanks! |