aaragon wrote:
Hello All,
I am using the following macros;
#define str(x) # x
#define conc(x,y) x ## y
to play with strings. Does anyone know if there is an equivalent
provided by the standard library to accomplish this? Thank you,
No, there isn't anything. However, to properly concatenate those
you might want to use indirection, i.e. have another set of the two
macros to help:
#define applystringize(x) # x
#define str(x) applystringize(x)
#define applyconcatenate(x,y) x ## y
#define conc(x,y) applyconcatenate(x,y)
because otherwise if you use macros like 'conc(x, str(x))', it
won't do it without this extra indirection stuff.
V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask