1.

How To Redefined Macro With Different Value?

Answer»

The #undef preprocessor can be USED to reset a macro. For example,
#ifdef SAMPLE /* Checking if SAMPLE is defined */
#undef SAMPLE /* If so, then reset it */
#endif
#define SAMPLE 0 /* Then redefine with INTENDED value */

The #undef preprocessor can be used to reset a macro. For example,
#ifdef SAMPLE /* Checking if SAMPLE is defined */
#undef SAMPLE /* If so, then reset it */
#endif
#define SAMPLE 0 /* Then redefine with intended value */



Discussion

No Comment Found