31. STL Containers

It was new. It was singular. It was simple. It must succeed!

– H. Nelson

Introduction

Container Overview

Container Representation; Element Requirements

Operations Overview

Member Types; Constructors, Destructor, and Assignments; Size and Capacity; Iterators; Element Access; Stack Operations; List Operations; Other Operations

Containers

vector; Lists; Associative Containers

Container Adaptors

stack; queue; priority_queue

Advice

31.1. Introduction

The STL consists of the iterator, container, algorithm, and function object parts of the standard library. The rest of the STL is presented in Chapter 32 and Chapter 33.

31.2. Container Overview

A container holds a sequence of objects. This section summarizes the types ...

Get The C++ Programming Language, 4th Edition 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.