Hi guys,
I need to write a wrapper for sprintf which accepts an arbitrary number of inputs (like sprintf does) and then pass these on to the wrapped sprintf function itself.
How do I do this without using sprintf outside the function? Something like:
Cheers,Code:void do_somthing( const char *str, ...zero_or_more_inputs...){ char buff[BUFFER_SIZE_MAX]; // pass vars on to sprintf sprintf( buff, str, ...zero_or_more_inputs...); // use buffer use_buffer( buff ); }
Pea