VS2010 vector's iterator incompatible

Posted by Ernesto Rojo Jr on Stack Overflow See other posts from Stack Overflow or by Ernesto Rojo Jr
Published on 2010-05-27T20:46:43Z Indexed on 2010/05/27 20:51 UTC
Read the original article Hit count: 929

Filed under:
|

I just updated to VS2010 from 2008. Now i'm getting an exception from vector iterators. Here's a code snippet that shows the issue.

std::vector<CButton*> m_objButtons;

for (std::vector<CButton*>::iterator i = m_objButtons.begin();
     i != m_objButtons.end();
     ++i) 
{}

I get the debug message "vector iterators incompatible". Anyone run into this too?

© Stack Overflow or respective owner

Related posts about iterators

Related posts about VS2010