Copy constructor, objects, pointers
- by Pauff
Let's say I have this:
SolutionSet(const SolutionSet &solutionSet) {
this->capacity_ = solutionSet.capacity_;
this->solutionsList_ = solutionSet.solutionsList_; // <--
}
And solutionsList_ is a vector<SomeType*> vect*. What is the correct way to copy that vector (I suppose that way I'm not doing it right..)?