Hi All! Please I need some help, I'm trying to get the number of arguments using NUMARGS(__VA_ARGS__):
here is the definition of the macro NUMARGS:
#define NUMARGS(...) (sizeof((int[]){__VA_ARGS__})/sizeof(int));
but the compiler throws always this error : the identifier __VA_ARGS__ can only appear in the replacement lists of variadic macros, I don't know why. so how to resolve this problem? thanks.