I want to define a macro function which support at the same time:
1) No input parameter
2) Input parameters
some thing like that:
#de
You can use sizeof for this purpose.
Consider something like this:
#define MACRO_TEST(X) { \ int args[] = {X}; \ printf("this is a test\n");\ if(sizeof(args) > 0) \ printf("%d\n",*args); \ }