Chapter 3: STL Containers

In this chapter, we will focus on the container classes in the STL. In short, a container is an object that contains a collection of other objects, or elements. The STL provides a complete suite of container types that form the foundation of the STL itself.

A quick overview of the STL container types

The STL provides a comprehensive set of container types, including sequential containers, associative containers, and container adapters. Here's a brief overview:

Sequential containers

The sequential containers provide an interface where the elements are arranged in sequence. While you may use the elements sequentially, some of these containers use contiguous storage, and others do not. The STL includes these sequential ...

Get C++20 STL Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.