ZeekLTK
09 Dec 2005, 12:57 PM
I have a function that takes these arguements:
void aFunction(vector<tclass>, gclass&, gclass&, gclass&, gclass&, gclass&, gclass&, gclass&, gclass&)
In the function I create a vector<gclass> and store all 8 inputted gclasses into it. Then I have a loop which goes through the vector and makes (different) changes on each class one at a time.
The function does exactly what it is suppose to, and makes all the changes correctly... but then when the function ends, it does not save any of those changes and my gclasses are exactly the same as they were before I put them into the function!
It's probably something stupid I am overlooking, but I can't figure it out at the moment. So, how do I make my function save the changes it makes to the classes that I inputted into it??
I have tried inputting them with and without the '&' sign on the end, neither works.
Thanks in advance!
void aFunction(vector<tclass>, gclass&, gclass&, gclass&, gclass&, gclass&, gclass&, gclass&, gclass&)
In the function I create a vector<gclass> and store all 8 inputted gclasses into it. Then I have a loop which goes through the vector and makes (different) changes on each class one at a time.
The function does exactly what it is suppose to, and makes all the changes correctly... but then when the function ends, it does not save any of those changes and my gclasses are exactly the same as they were before I put them into the function!
It's probably something stupid I am overlooking, but I can't figure it out at the moment. So, how do I make my function save the changes it makes to the classes that I inputted into it??
I have tried inputting them with and without the '&' sign on the end, neither works.
Thanks in advance!