STL

c++ std::vector and Iterator Invalidation example

In this article we will discuss the iterator invalidation with respect to std::vector in C++. What is Iterator Invalidation? An Iterator becomes invalidate when the container it points to changes its shape internally i.e. move elements from one location to another and the initial iterator still points to old invalid location. Iterator invalidation in vector

c++ std::vector and Iterator Invalidation example Read More »

Scroll to Top