LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   #defining a macro inside a macro? (https://www.linuxquestions.org/questions/programming-9/defining-a-macro-inside-a-macro-326668/)

saravkrish 05-24-2005 02:16 PM

#defining a macro inside a macro?
 
Hi,

Is there anyway something similar to this could be done?

#define TEST(a,b,c) #define a b,c

1. The example above is actually a very simple version of what I want to do.
2. It might seem straight forward to simply do #define a b,c instead of calling TEST(a,b,c), but the real case where I want to use this makes much more sense than this.

Thanks,
Sarav

jonaskoelker 05-24-2005 09:48 PM

I'm 90% sure it can't be done using cpp, but m4 can do it.


All times are GMT -5. The time now is 03:56 PM.