Tag: STL
All the articles with the tag "STL".
-
C++ Iterators Explained: How to Traverse STL Containers for Beginners
Updated:Understand C++ iterators from scratch. Learn begin(), end(), iterator types, range-based for loops, and how iterators work with vectors, maps, and sets.
-
C++ Remove Element from Vector (and Remove Duplicates)
Updated:Learn how to remove elements from a vector in C++ by index or by value with the erase-remove idiom, plus how to remove duplicates. Clear beginner examples.
-
C++ vector reserve vs resize: What's the Difference?
Updated:C++ vector reserve vs resize: reserve allocates capacity without adding elements, resize changes the size. Learn when to use each, with clear examples.
-
How to Insert Into a Vector in C++ (insert, emplace, push_back)
Insert elements into a C++ vector at the beginning, middle or end. Covers insert with iterators, emplace, inserting ranges, and why iterators get invalidated.