Possible Duplicate:
What does ## mean for the C(C++) preprocessor?
#define SIMPLE16_DESC_FUNC1(num1, log1) \
bool \
Simple16::try##num1##_##log1##bit(uint32_t *n, uint32_t len) \
{ \
uint32_t i; \
uint32_t min; \
\
min = (len < num1)? len : num1; \
\
for (i = 0; i < min; i++) { \
if (int_utils::get_msb(n[i]) > log1 - 1) \
return false; \
} \
\
return true; \
}
I found this code in someone’s code, it seems “##” operator plays an important role in the function name. Anyone tells me what its usage?
It’s the token pasting operator. It concatenates two tokens where one is an argument to the macro.