title: Iterator of Vector<Vector<Point> >
body: <p>I know these iterator questions have been asked and answered a thousand times, however when I compile the following code, I still get this error:</p>
  
  <blockquote>
    <p>error C2440: 'initializing' : cannot convert from
    'std::_Vector_iterator&lt;_Myvec>' to 'cv::Vector&lt;_Tp> *'</p>
  </blockquote>
  
  <p>.</p>
  
  <pre><code>void iterate(vector&lt;vector&lt;cv::Point&gt; &gt;&amp; contours){
    Vector&lt;Vector&lt;cv::Point&gt;&gt;::iterator it = contours.begin();
    for( int i = 0; i&lt; contours.size(); i++ ){
      if(contourArea(contours[i])&gt;1000){
          it++;
      }else{
          contours.erase(it);
      }
  }
  }
  </code></pre>
  
  <p>I don't see anything wrong with this code. The template type of the vector for the new iterator is the same like the vector I'm getting the iterator from.</p>