M
Michael Cohen
Hi,
I have to write a function that gets variable number of parameters and
pass them to another function (existing).
The problem is that the prototype of the function I call has ",..." so
I can't just pass it parameters in the format of va_list.
The following code does not work since f2 doesn't take arg_list (the
prototype of f2 is the same as f1's)
void f1(char a ,...)
va_list arg_list;
va_start (arg_list, a);
f2(a,arg_list); <==== f2 doesn't take arg_list
va_end;
any ideas how I can do it?
Thanks,
Michael
(e-mail address removed)
I have to write a function that gets variable number of parameters and
pass them to another function (existing).
The problem is that the prototype of the function I call has ",..." so
I can't just pass it parameters in the format of va_list.
The following code does not work since f2 doesn't take arg_list (the
prototype of f2 is the same as f1's)
void f1(char a ,...)
va_list arg_list;
va_start (arg_list, a);
f2(a,arg_list); <==== f2 doesn't take arg_list
va_end;
any ideas how I can do it?
Thanks,
Michael
(e-mail address removed)