Greets.
I have a function that takes a variable number of arguments (va_list). I want this function to send all the arguments, as received to another function, that also accepts a variable number of arguments (va_list).
What i tried was:
int func1(char *something, ...){
va_list v1;
va_start(something, v1);
func2(something, v1);
va_end(v1);
return (0);
}
int func2(char *something, ...){
va_list v1;
va_start(something, v1);
//... do something with the data...
va_end(v1);
return (0);
}
|
obviously the above doesn''t work. I''ve also tried...
int func1(char *something, ...){
func2(something);
return (0);
}
int func2(char *something, ...){
va_list v1;
va_start(something, v1);
//... do something with the data...
va_end(v1);
return (0);
}
|
Any ideas?
thanx.
... LEMMINGS ... LEMMINGS ... LEMMINGS ... LEM..... SpLaSh!...
Is it what we look like on the eyes of destiny or God?
Are we LeMmIngS or WhAt!?
... LEMMINGS ... LEMMINGS ... LEMMINGS ... LEM..... SpLaSh!...Could this be what we stand like before the mighty One?Are we LeMmIngS or WhAt!? ;)