Hi all,
Really simple question I guess, but i'm tired... and hate programming but have an assignment in fairly soon, and although i've nearly completed it i'm trying to add a bit more functionality...
I basically want to return a vector out of a function, to the function that originally called the called function. (lol)
I've got... (this is in the function that calls the other function...)
So that passes another vector and an integer value through to;
I basically want to return vec1 that was created in the second quote, to the calling function. What do I need to do?
a return statement? (which I can't seem to get working!!)
Any help appreciated, i've tried loads of things that I can't see why won't work :S
Really simple question I guess, but i'm tired... and hate programming but have an assignment in fairly soon, and although i've nearly completed it i'm trying to add a bit more functionality...
I basically want to return a vector out of a function, to the function that originally called the called function. (lol)
I've got... (this is in the function that calls the other function...)
void class4::menuenu(vector<AnotherVec> & tempVecAN)
{
disp(tempvec, chc);
}
So that passes another vector and an integer value through to;
void class4::disp(vector<AnotherVec> & tempVecAN, int chc)
{
// some ommited...
vector<vec> vec1;
vec1.push_back(vec(temp->var1, temp->var2));
}
I basically want to return vec1 that was created in the second quote, to the calling function. What do I need to do?

Any help appreciated, i've tried loads of things that I can't see why won't work :S