Possible Duplicate:
C/C++: How to make a variadic macro (variable number of arguments)
Just wondering if this is at all possible., so instead of how im currently handling logging and messages with multiple parameters im having to have a number of different macros for each case such as:
#define MSG( msg )
#define MSG1( fmt, arg1 )
#define MSG2( fmt, arg1, arg2 )
#define MSG3( fmt, arg1, arg2, arg3 )
#define MSG4( fmt, arg1, arg2, arg3, arg4 )
#define MSG5( fmt, arg1, arg2, arg3, arg4, arg5 )
#define MSG6( fmt, arg1, arg2, arg3, arg4, arg5, arg6)
is there any way of defining just one macro that can accept any number of arguments?
thanks