How to use # inside a macro definition

Kapileswar Rao kapileswar_rao@mentorg.com
Mon Nov 10 07:03:00 GMT 2003


Hello ,
   I need some help regarding how to use # inside macro definition in C
macros. I get an error, '#' is not followed by a macro parameter. I
understand the reason but is there no escape character to avoid it
expecting a macro parameter.

An example of my macro definition is

#define exmp(par1,par2) {\
#ifdef EVAL   \
	par1 = par2; \
#endif  \
	} 

Anticipating Help.
thanks and regards,
--Kapil



More information about the Gcc-help mailing list