Appendix E: The Standard Template Library (STL)

Overview

The STL is a subset of the ISO/ANSI C++ standard library. The STL provides three kinds of facilities for C++ programmers to use: containers, iterators, and generic algorithms.

An STL container holds other objects, much like the containers you have studied in this text: lists, stacks, queues, and so on. Specifically, the STL supplies many useful container classes, some of which are the following:

list A sequential-access list that can be traversed both forward and backward.
vector An abstraction of a one-dimensional array providing, as expected, random access to the array elements.
stack A stack, with the usual LIFO access.
queue A queue, with the usual FIFO access.
deque ...

Get C++ Plus Data Structures, 6th 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.