The C++ STL (Standard Template Library) is a powerful set of C++ template classes to provide general-purpose classes and functions with templates that implement many popular and commonly used algorithms and data structures like vectors, lists, queues, stacks, de-queues, priority queues.
At the core of the C++ Standard Template Library are following three well-structured components:
-
Containers: Containers are used to manage collections of objects of a certain kind. There are several different types of containers like deque, list, vector, map etc.
-
Algorithms: Algorithms act on containers. They provide the means by which you will perform initialization, sorting, searching, and transforming of the contents of containers.
-
Iterators: Iterators are used to step through the elements of collections of objects. These collections may be containers or subsets of containers.