I m looking to write a function to replace fprintf
int fprintf ( FILE * stream, const char * format, ... );
I m not sure how to define a function such as this, because, after the format parameter, this function takes a variable number of parameters. Specifically, it takes at least as many additional arguments as were specified in the format.
UPDATE I found a resource on the subject (http://publications.gbdirect.co.uk/c_book/chapter9/stdarg.html), but the example doesn t seem to compile under Linux, the OS that I m using.
An example of a replacement for fprintf which just calls fprintf would be helpful.
This isn t homework. I m just a beginner who is trying to learn how to program in his free time. Thanks!