<<< STL Iterators | Index | std::map >>> |
// Using iterator after content of the container changes: vect.insert( data ); ++iter; // Can be DANGEROUS! Iterator may be invalid! // Navigating and dereferencing the iterator to access the data: ++iter; *iter = data; cout << *iter; iter = data; // incorrect cout << iter; // incorrect
<<< STL Iterators | Index | std::map >>> |