3 ms·
This is what you have to do to concatenate a string with another macro: #define VARIABLE 3 #define NAME2(fun,suffix) fun ## _ ## suffix #define NAM
by pmelendez 11y ago
This is what you have to do to concatenate a string with another macro:
#define VARIABLE 3
#define NAME2(fun,suffix) fun ## _ ## suffix
#define NAME1(fun,suffix) NAME2(fun,suffix)
#define NAME(fun) NAME1(fun,VARIABLE)
int NAME(some_function)(int a);
From:http://stackoverflow.com/questions/1489932/how-to-concatenate-twice-with-the-c-preprocessor-and-expand-a-macro-as-in-arg http://stackoverflow.com/questions/1489932/how-to-concatenat...
C preprocessor can be confusing at times.