Wrapping *printf

    void tee(FILE* f, const char* fmt, ...)
    {   char s[200];  // sloppy
        va_list arg;
        va_start(arg, fmt);
        vfprintf(f, fmt, arg);
        vsprintf(s, fmt, arg);
        va_end(arg);

        dBug::fdump() << s;
    }

-- MattWalsh - 13 Nov 2009

Topic revision: r1 - 13 Nov 2009 - MattWalsh
 
This site is powered by the TWiki collaboration platformCopyright © 2008-2012 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback