This is because of evaluation rules for macros. You will need to define some kind of helper macro that gets the number as a token:
#define HELLO_1(N, ...) hello ## N #define HELLO_0(N, ...) HELLO_1(N, __VARGS__) #define HELLO(...) HELLO_0(PP_NARG(__VA_ARGS__), __VARGS__)
or so. You can also take a look at the P99 preliminary documentation. This will provide you with more convenient macro tools to do this directly.
Jens gustedt
source share