Ok itz atleast tricky to me!
I want to write a macro which will do something
like
#define PRINTF(x) printf x
:
somewhere in code
:
PRINTF(("This is a zero %d\n", 0));
:
:
Works fine until now.
Now I need to make it something like
#define PRINTFX(x) \
fnCall(someparam, x)
Cant get this to work! Please note that x denotes variable number of parameters like printf.
The intended use is like
PRINTFX("One", "This is one %d\n", 1);
PRINTFX("Two", "Nothing);
Can add any number of paranthesis to the parameters.
Thanks for any help, nope this is not a brain teaser, it would be cool if I could make this work ... else the good old way, multiple functions with variable number of parameters to a function.



LinkBack URL
About LinkBacks



