I am calling a function firstFunction and passing it variadic arguments (const char* fmt, ...) : I would like to execute some calculations here and then pass the parameters to another function, secondFunction that has (const char* fmt, ...) as input arguments.
void firstFunction(const char* fmt, ...)
{
//does some pre-condition stuff
//calls secondFunction (how?)
}
void secondFunction(const char* fmt, ...)
{
//prints the input parameters in a va_list using vsnprtinf
}
What is the C++ syntax to pass variadic arguments from a function to another?
EDIT 1: I can't use templates, since I would like these functions to be a definition of pure virtual functions declaration.