Preprocessor string pasting fun
Hi guys, my first post here.
I'm having trouble doing string concatenation at the preprocessor level.
This works fine :
Code:
#define A "TOKEN1" "TOKEN2"
and this also works fine:
Code:
#define A "TOKEN1"
#define B "TOKEN2" A
but this refuses to compile :
Code:
#define A "TOKEN1" __FUNCTION__
The only difference seems to be that __FUNCTION__ is a builtin.
Is there any other way to do this kind of concatenation? It's important that this happens on the preprocessor. BTW, this is with g++ 3.2.
Thanks in advance!