Take a function like printf that accepts a variable number of arguments what I would like to do is pass these variable number of functions to a sub function without changing their order. An example of this would be aliasing the printf function to a function called console ...
#include <stdio.h>
void console(const char *_sFormat, ...);
int main () {
console("Hello World!");
return 0;
}
void console(const char *_sFormat, ...) {
printf("[APP] %s\n", _sFormat);
}
If I did for example console("Hello %s", sName)
, I would want the name to be passed to the printf function also, but it has to be able to continue to accept a varable number of arguments like the printf already does.