   STL Vector Query!!
  If i have an iterator to the begin() of an empty stl vectorvector::iterator it;it = vect.begin();so vect.size() = 0 as the vector is empty.If i add something to the vector likevect.push_back(t);If i look at the "iterator it" it has an undefined result in it.But it i were to say:it = vect.begin();Now its correct, with the right values,Why is this?Shouldn''t it point to the new item correctly and not require a begin() call.Just bugging me, u know!!Keith  
  If you add something to a vector, it may be resized. This invalidates your iterators. If you don''t want it to be resized, you need to make sure there''s sufficient capacity beforehand. Use reserve() to do this, which will invalidate iterators immediately but guarantee no more invalidations through vector growth until the capacity is reached.   [ MSVC Fixes | STL Docs | SDL | Game AI | Sockets | C++ Faq Lite | Boost  Asking Questions | Organising code files | My stuff | Tiny XML | STLPort] 