How to pass variable args from a wrapper function to fprintf

hercules

Disciple
Hello,

I was writing a function, which accepts a variable number of agrs, does some operations and may decide that it should act as a normal fprintf().

like logTofile(fileIP,char* format, ...)

Now when this function knows that it has to call a function like fprintf(), with all the variable args, is it possible to pass the variable arguments directly to that function , I mean by not reading those args first using va_arg ?
 
In UNIX you can do so. You can pass variable number of arguments to a shell script and basis on your args you can have shell behave differently
 
Back
Top