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.
Wrap log_x in a function
-
- Posts: 9730
- Joined: Thu Nov 26, 2015 4:08 am
Re: Wrap log_x in a function
This might give you some ideas on how to do this. It depends on the existence of some vlog_x function, not sure if you have that.
-
- Posts: 2
- Joined: Thu Aug 12, 2021 10:53 pm
Re: Wrap log_x in a function
The answer is certainly on a higher level than mine. But through it I will try to find my solution. Otherwise I will come back. Thank you
Who is online
Users browsing this forum: No registered users and 42 guests