I need to give a unique interface for different implementations of outputs for different platforms. To do this i need to define a prototype with a variable number of arguments in the end like printf() but i don't know : how to do this?
It should be something like this:
Code:
int SPRINTF(char * string, const char * FormatString, void * arg1, void * arg2,..)
{
#if LINUX
snprintf(string, sizeof(string), FormatString, *arg1, *arg2,..);
#else if WINDOWSCE
sprintf(string, FormatString, *arg1, *arg2,..);
#endif
}