Saving value of a MACRO( #define ) before redefining!

Use push_macro and pop_macro to save and restore the value of a macro before redifining the same to some other value. Here is a sample from MSDN… [sourcecode language=’cpp’]// pragma_directives_pop_macro.cpp // compile with: /W1 #include #define X 1 #define Y 2 int main() {    printf(“%d”,X);    printf(“n%d”,Y);    #define Y 3   // C4005    […]
Continue reading…