Chapter 5. Using the Standard Library Containers
The Standard Library provides several types of containers; each is provided through a templated class so that the behavior of the container can be used for items of any type. There are classes for sequential containers, where the ordering of the items in the container is dependent on the order that the items are inserted into the container. Also there are sorted and unsorted associated containers that associate a value with a key, and subsequently the value is accessed using the key.
Although not containers themselves, in this chapter we will also cover two related classes: pair
that links two values together in one object, and tuple
, that can hold one or more values in a single object.