This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

How to use # inside a macro definition


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]