Possible Duplicate:
c++ preprocessor macro expansion to another preprocessor directive
My question is very simple: I want to use "#" in the macro expansion, for example, to define a marco 'M(X)':
#define M(X) #ifdef FOO \
X=1 \
#else \
X=2
I tried to use '\' to escape the '#', but the '\' is interpreted as the newline for macro expansion, and not as the escape character. So how to use '#' in the macro expansion?
Thanks folks!