We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Hi, for debugging we often use things like:
#ifdef MONITOR printf("initialized\n"); #endif
#ifdef MONITOR #define debug_printf printf #else #define debug_printf // #endif debug_printf("inittialized\n");
"The intention was to replace the word debug_printf with '//'" No, that won't work - because the preprocessor strips the comments before it does the macros! (or something like that) The trick is to double-up the parentheses - see: http://www.keil.com/forum/docs/thread3796.asp