PDA

View Full Version : How to find debug or release mode using code?



Gokulnathvc
14th December 2011, 06:42
I would like to change the code in release mode. How to find the release mode in code and then changing the code accordingly?

FelixB
14th December 2011, 07:42
set a preprocessor directive "DEBUG" for debug-mode and "NDEBUG" for release code. in your code, you can do


#ifdef DEBUG
// debug code
#endif