Chapter 5
Standard Library Containers and Algorithms
Section 1
Lesson Overview
The core of C++ is its Standard Template Library (STL), a set of common data structures and algorithms. The components of the STL are parametric, so they can be reused and combined. STL is composed of: - Containers are used to store collections of elements of a certain type. Usually, the type of the container is a template parameter, which allows the same container class to support arbitrary elements. - Iterators are used to traverse the elements of a container. Iterators offer the programmer a simple and common interface to access containers of a different type. - Algorithms are used to perform standard operations on the elements stored in the containers. They use iterators to traverse the collections, since their interface is common to all the containers, so that the algorithm can be agnostic about the container it's operating on.