Wrap log_x in a function
Posted: Fri Aug 13, 2021 12:02 am
Hi masters. I am a beginner in programming and I ask for your help to help me solve a problem that has been tiring me for several days. I would like to provide the arguments of the log_x through a function. But I can't do it.
Example:
void foo(const char* test, ...)
{
log_x(test, ...);
}
int x = 5;
foo("help: %d", x); // expected: [x][fileName][line]foo() : help: 5
Thanks you for your help.
Example:
void foo(const char* test, ...)
{
log_x(test, ...);
}
int x = 5;
foo("help: %d", x); // expected: [x][fileName][line]foo() : help: 5
Thanks you for your help.