title: Why is this vector iterator not incrementable?
body: <p>I'm trying to delete the vector's content and I'm getting an error - vector iterator is not incrementable, why is that?  </p>
  
  <p>This is my destructor:</p>
  
  <pre><code>City::~City()
  {
      vector &lt;Base*&gt;::iterator deleteIterator;
      for (deleteIterator = m_basesVector.begin() ; deleteIterator != m_basesVector.end() ; deleteIterator++)
          m_basesVector.erase(deleteIterator);
  }  
  </code></pre>
  
  <p>thanks.</p>