A
Alan Ning
I have a class that contains a stl vector as a private member. I would
like to write an accessor method for this stl vector. However, I don't
want to return a whole copy of the vector. What should I do in this
case?
Right now, I am returning the address of the vector.
const vector<> * ReturnVector() const { return m_vector; };
Is this a good idea? What's the proper way of writing an accessor
method for a big object such as the stl vector?
Thanks
.... Alan
like to write an accessor method for this stl vector. However, I don't
want to return a whole copy of the vector. What should I do in this
case?
Right now, I am returning the address of the vector.
const vector<> * ReturnVector() const { return m_vector; };
Is this a good idea? What's the proper way of writing an accessor
method for a big object such as the stl vector?
Thanks
.... Alan