carlpaddick
asked on
Preprocessor directive from running within Developer Studio?
I'm creating a little Win32 console app from within Developer Studio. Whilst I am developing in debug, I am putting
#ifdef _DEBUG
getchar();
#endif
statements in various places, to stop the console window disappearing when the program terminates.
I would like to know if there is a preprocessor directive similar to _DEBUG that stipulates that the program is being executed from Developer Studio, rather than the command line such as _DEVELOPERSTUDIO. This would eliminate the confusion of having to hit return if the debug version of the program was run on the command line.
#ifdef _DEBUG
getchar();
#endif
statements in various places, to stop the console window disappearing when the program terminates.
I would like to know if there is a preprocessor directive similar to _DEBUG that stipulates that the program is being executed from Developer Studio, rather than the command line such as _DEVELOPERSTUDIO. This would eliminate the confusion of having to hit return if the debug version of the program was run on the command line.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
anyway really you should compile a release when running out of DevStd, this would completley solve all probs
ASKER
Thanks for all of your comments makerp. You've posted some very useful ones. Please have the points.
cheers, glad to help
/* global */
int stopper = 0;
then in main set it to 1 if your passed a certain command line option
in the code
if(stopper) getch();
open project settings and add the option