I have a class that has a vector of objects. What do I need to do to return one of this objects and change it outside the class, keeping the changings? Is it possible to do with regular pointers? Is there a standard procedure? (And yes, my background is in Java.)
Share
If you have std::vector where A is your class, you could return a std::vector::iterator.
Beware, that iterators may be invalidated, if the vector changes!