Can you nest C preprocessor directives?

mannicken picture mannicken · Jan 9, 2009 · Viewed 9k times · Source

For instance, is the following possible:

#define definer(x) #define #x?

Answer

shoosh picture shoosh · Jan 9, 2009

No, you can't do that.
The pound (#) symbol has a different meaning while in a definition. it means - if this is an argument, make it a string by quoting it.