Possible Duplicate:
C/C++: Passing variable number of arguments around
I need to put all functions calling into a C API into a separate source file unit. It is due to defines interfering with other code. So to keep the possibly interfering code separate.
Anyway, most functions are eg int function2(int) so I just implement in separate file like this:
int XXfunction1(int val) { return function(val) }
But I also have functions with variable arguments like this:
extern int function2(int, ...)
So how can I write my own function which calls that?
This doesn't seem to work:
int XXFunction2(int val, ...) {
return function2(val, ...);
}
How do I write the function?