Is there any way to directly pass a variable number of arguments from one function to another?
I'd like to achieve 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 is going to be duplicated multiple times so I'd like to keep it as minimalist as possible while also keeping the function call very short
int func1(string param1, ...){
int status = STATUS_1;
va_list args;
va_start(args, param1);
func2(status, param1, args);
va_end(args);
}
Thanks!