I wish to add a wrapper function for printf, to allow multiple debug levels for my program. For example, I could pass it "-v 5" to be very verbose, or "-v 0" to print nothing at all.
The prototype function for printf is:
int printf (const char *format, ...);
How would I make my own function, my_printf, that takes into account the verbosity setting, and calls the real printf?