c++ - This possible with C/C++ macros?
- Nick Sabalausky (8/8) Aug 23 2012 With the C/C++ preprocessor, is there a way to have a macro
- Nick Sabalausky (6/18) Aug 23 2012 Oops, found what I needed here:
With the C/C++ preprocessor, is there a way to have a macro argument expand like this? (where '??????' is what I don't know what to write): // Just an illustrative example obviously pointless as-is: #define FACTORY_OF(a) ?????? FACTORY_OF(Bar).blah // Make that expand to: BarFactory.blah
Aug 23 2012
On Thu, 23 Aug 2012 21:31:53 -0400 Nick Sabalausky <SeeWebsiteToContactMe semitwist.com> wrote:With the C/C++ preprocessor, is there a way to have a macro argument expand like this? (where '??????' is what I don't know what to write): // Just an illustrative example obviously pointless as-is: #define FACTORY_OF(a) ?????? FACTORY_OF(Bar).blah // Make that expand to: BarFactory.blahOops, found what I needed here: http://gcc.gnu.org/onlinedocs/cpp/Concatenation.html Solution: #define
Aug 23 2012