I want the code
to be replaced by the codeCode:MY_MACRO(x)
However, this macro does not compile:Code:#ifdef my_class_##x #error My error message #endif class my_class_##x { ... };
Is there a way to accomplish something like this?Code:#define MY_MACRO(x) \ #ifdef my_class_##x \ #error My error message \ #endif \ class my_class_##x; \ { \ ... \ };




Reply With Quote