Possible Duplicate:
C Programming: Forward variable argument list.
What I d like to do is send data to a logging library (that I can t modfify) in a printf kind of way.
So I d like a function something like this:
void log_DEBUG(const char* fmt, ...) {
char buff[SOME_PROPER_LENGTH];
sprintf(buff, fmt, <varargs>);
log(DEBUG, buff);
}
Can I pass varargs to another vararg function in some manner?