void vMerge(vector<int> *dest, vector<int> v2, ...)
{
va_list param;
va_start(param,v2);
// dest <- v2
dest->insert(dest->end(),v2.begin(),v2.end());
vector<int> arg;
while(param != NULL) // how do I stop it when it's at last parameter
{
arg = va_arg(param,vector<int>);
dest->insert(dest->end(),arg.begin(),arg.end());
}
va_end(param);
}
I have a function that copies multiple vectors into one vector dest, my problem right now is to stop the while loop from continuing after the last parameter. Any help is appreciated.