I\'m trying to delete the vector\'s content and I\'m getting an error - vector iterator is not incrementable, why is that?
This is my destructor:
C
The problem is that you are trying to use an iterator while using the erase() function. erase(), push_back(), insert(), and other modifying functions invalidate iterators in STL.
Just use the clear() function:
City::~City() { m_basesVector.clear(); }