On Tue, Jun 21, 2011 at 12:24 PM, Trung Ngo <[email protected]> wrote:
> make a macro
> #define dupPrint(string) { printf(string); fprintf(fp,string); }
sorry, this won't work. You have to mess around with va_list after all
if you insist on having a function that behaves like printf.
How about not having your function deal with multiple arguments and
leaving all the work to sprintf() which will write everything to a
buffer? After that all your function has to do is to print out the
buffer as a large string.
_______________________________________________
POST RULES : http://wiki.hanoilug.org/hanoilug:mailing_list_guidelines
_______________________________________________
HanoiLUG mailing lists: http://lists.hanoilug.org/
HanoiLUG wiki: http://wiki.hanoilug.org/
HanoiLUG blog: http://blog.hanoilug.org/