"Frank B. Brokken" <[EMAIL PROTECTED]> writes: > class Foo > { > va_list list; > > public: > Foo(int n, ...) > { > va_start(list, n); > } > void bar() const > { > va_list l(list); > cout << "Saw " << va_arg(l, int) << endl; > } > };
The behavour of this code is undefined, since ther is no va_end matching the va_start. Please try to provide an example without undefined behaviour. You probably need va_copy. -- Falk