[an error occurred while processing this directive]
|
__VA_ARGS__
Variadic macros are the preprocessor macro equivalents of printf style functions.
Syntax
#define P(...) __VA_ARGS__
#define P(x,y,...) x + y + __VA_ARGS__
Here, __VA_ARGS__ will contain all variadic arguments concatenated, including th
separating commas.
Example
#if DEBUG
#define DEBUG_TRACE(...) printf(S,__VA_ARGS__)
#else
#define DEBUG_TRACE(...)
#endif
...
DEBUG_TRACE("The value is:%d\n",value);
will result in:
printf("The value is:%d\n",value);