Override printf function

2.1k views Asked by At

I have to override the standard printf function and implement it in a user-specific way. I have tried it as follows:

extern "C" int printf(const char* format, ...)
{
    // user specific implementation
}

With gcc, this code can be built. Visual Studio aborts the build with the following error message:

Error C2084 function 'int printf(const char *const ,...)' already has a body

Thanks you for any hints

0

There are 0 answers