in my interview, a question is :what's wrong

wendywendy (wind)
for (aIterator = aVector.begin();aIterator != aVector.end())
{
if (aVector.get(aIterator )==0)
aIterator =aVector.erase(aIterator );
alterator++;

}

so, if the last element is 0,error ?I failed to answer this question
(#141715@0)
2001-7-23 -05:00

回到话题: (C++)How to get object from vector one by one in a loop? thanks. After I erase an element from a list,where the pointer will point to?

回到论坛: HOME枫下论坛枫下论坛主坛工作学习IT技术讨论

URL:   
http://www.rolia.net/zh/post.php?f=0&p=141715