Possible Duplicate:
C/C++: Passing variable number of arguments around
I'm currently using the following macro declared on my C file.
#define COMMON_Print(...) printf (__VA_ARGS__)
Now that call works just fine, but turns out that I need to be able to create a C function that looks something like this:
void COMMON_Print(...)
{
printf (__VA_ARGS__);
}
So that function doesn't work, I get an error
"Error : undefined identifier __VA_ARGS__"
The complexity of my project requires to have a function since it's an interface... So how can I get the parameters ... and pass them to the printf function? Or better what am I doing wrong?
Thanks!