title: error C2664 - code compiles fine in VC6; not in VS 2010
body: <p>I have a typedef, a class with a member vector using that type and then a method using std::&lt;vector&gt;::erase().</p>
  
  <pre><code>#typedef DWORD WordNo_t;
  
  class CWordList : public CObject
  {
  public:
  WordNo_t* begin() { return m_Words.begin(); }
  WordNo_t* end()   { return m_Words.end(); }
  void truncate (WordNo_t *Ptr)
  {
    if (Ptr == end())
      return;
    ASSERT (Ptr &gt;= begin() &amp;&amp; Ptr &lt; end());
    // following line generates C2664
    m_Words.erase (Ptr, end());
  }
  
  private:
    std:vector&lt;WordNo_t&gt; m_Words;
  }
  </code></pre>
  
  <p>The detailed error is:<br>
  error C2664: 'std::_Vector_iterator&lt;_Myvec> std::vector&lt;_Ty>::erase(std::_Vector_const_iterator&lt;_Myvec>,std::_Vector_const_iterator&lt;_Myvec>)' : cannot convert parameter 1 from 'const WordNo_t' to 'std::_Vector_const_iterator&lt;_Myvec>'</p>
  
  <p>Pretty new to STL... Any help would be appreciated.</p>