Standard Template Library
Ready-made containers, iterators and algorithms that cover most data-handling needs.
Intermediate
The STL has three parts:
- Containers —
vector,array,deque,list,map,unordered_map,set,stack,queue,priority_queue. - Iterators — a uniform way to walk through any container.
- Algorithms —
sort,find,count,accumulate,transform, and many more.
Using them gives you correct, optimised code for free.
Sub-topics (3)
vector
A dynamic array that grows automatically — the default container in C++.
Easy♥ 0🔖 0💬 0
map and unordered_map
Key–value containers: map keeps keys sorted (tree), unordered_map uses hashing for faster lookups.
Intermediate♥ 0🔖 0💬 0
STL Algorithms
sort, find, count_if, accumulate and friends — loops you don't have to write.
Intermediate♥ 0🔖 0💬 0
Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.
Discussion (0)
Sign in or join free to ask questions and discuss this topic.