I have a function as below
extern "C" int FuncTrace(const char *fmt, ...)
{
va_list args;
va_start(args, fmt);
return printf(fmt, args);
}
If I print some thing on console as below, it does not work?
FuncTrace(" %s \n", __PRETTY_FUNCTION__ );
Can someone help me correct the FuncTrace() ?
You need the
vprintffunction if you want to pass in ava_listpseudo-argument: