Is there a way to directly pass a variable number of arguments from one function to another?
I would like to get a minimal solution like the following:
int func1(string param1, ...){ int status = STATUS_1; func2(status, param1, ...); }
I know I can do this using something like the following, but this code will be duplicated several times, so I would like to keep it as minimal as possible, as well as a very short circuit of the function
int func1(string param1, ...){ int status = STATUS_1; va_list args; va_start(args, param1); func2(status, param1, args); va_end(args); }
Thanks!
source share