O'Reilly logo

Using the C++ Standard Template Libraries by Ivor Horton

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

image

Map Containers

You retrieve an element from a sequence container by its position. You can access the first or last element of a deque, for example, or an element in a vector by its index position. Map containers work quite differently, as this chapter will explain. In this chapter you’ll learn the following:

  • What is meant by an associative container.
  • What a map container is and how it is typically organized.
  • The types of map containers that are available and their capabilities.
  • The functions that map containers provide.
  • What a pair is and what it is used for.
  • What a tuple is and how you use it.

Introducing Map Containers

The sequence ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required