Possible Duplicate:
C/C++: Passing variable number of arguments around
Imagine I have a function mySuperDuperPrintFunction
that takes a variable number of arguments. This function calls printf
(or any other function with a variable number of arguments. Can i somehow pass all, or only some, parameters from the arglist to the other function ? Like
void mySuperDuperPrintFunction(char* text, ...) {
/*
* Do some cool stuff with the arglist.
*/
// Call printf with arguments from the arglist
printf(text, *someWayToExtractTheArglist());
}