Let’s say I want to do something like this
void my_printf(char *fmt,...) {
char buf[big enough];
sprintf(buf,fmt,...);
}
What is the proper way of passing the variable number of arguments directly to a function with accepts variable arguments?
sprintfhas ava_listform calledvsprintf. Pass theva_listyou construct locally to it as the last argument.