This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
How to use # inside a macro definition
- From: Kapileswar Rao <kapileswar_rao at mentorg dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: 10 Nov 2003 12:34:10 +0530
- Subject: How to use # inside a macro definition
- Organization: Mentor Graphics
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