Is there a way to #define macro with variable length parameters?
#define CALL(ar1, ar2, ar3) do something #endif
in code C
CALL(0); CALL(0,1); CALL(0,1,2)
all calls invoke the CALL macro. If ar2, ar3 is not used, the preprocessor simply ignores the string with ar2 or ar3.
source share