If I am using standard preprocessing then I may perform an indirect quote by:
#define foo bar
#define quoteme_(x) #x
#define quoteme(x) quoteme_(x)
and then just use quoteme(foo)
to obtain "bar"
I want to do this, but using the pre-processor in traditional mode. I have attempted to just replace #x
with 'x'
but quoteme(foo)
just returns 'foo'
.
Any help is much appreciated.