I am hoping to get a newly generated vector and add into a global vector from calling two functions in main. I have a rough idea of how to do this but apparently this is not right..pretty new to c++ and I don't really quite want to deal with vector recycle..do I have to use pointers if I can't use C++11? what's the best way to do this?
void main(){
vector <int> newVector = function1 ();
addVector (newVector);
}
vector <int> function1 (){
....
return returnedVector
}
void addVectors (vector <int> incomingVector){
globalVector.insert( globalVector.end(), incomingVector.begin(), incomingVector.end());
}