Don't you need a va_end() ?Originally posted by parksie
VC++7, Win2000.Code:#include <iostream> #include <cstdarg> using namespace std; void two(int count, va_list va) { for(int i = 0; i < count; ++i) { cout << va_arg(va, int) << endl; } } void one(int count, ...) { va_list args; va_start(args, count); two(count, args); }




Reply With Quote