This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

duplicating printf()

I need to write a function that has the same parameters as printf(),
eg. my_printf(char*, ...), that will perform some minor operations
and then call the printf() function. What is the correct way to define
my function so that I can then pass the parameters to printf()?

Put another way, what is the type of the variable argument list,
"...", in the example below??


Thanks

////

int my_printf(char* pfmt,...)
{
// misc code here
printf(pfmt,...);
}

////

0