Hi all,
A quick question on macros. I dont think we came have a same macro defined twice with the an argument different between them. Like for example
Code:
#define DBG( FunPtr, MSG ) dbg(FunPtr, __FUNCTION__, MSG )
#define DBGvARG( FunPtr, MSG, ARG ) dbg(FunPtr, __FUNCTION__, MSG, ARG )
As you could see, if had to define with two different identifiers. It would be good to have a same name and the compiler to decide which one to resolve. Like function overloading in C++.
Something like follow
Code:
#define DBG( FunPtr, MSG ) dbg(FunPtr, __FUNCTION__, MSG )
#define DBG( FunPtr, MSG, ARG ) dbg(FunPtr, __FUNCTION__, MSG, ARG )
Is it possible in C?
Thanks guys!
Regards,
~ssharish