Chapter 17. STL Associated Containers (map, set)

The most sophisticated STL containers are the associated containers, which are effectively rudimentary databases.

Although associated containers lack several database features, such as a query language and a user interface, they do support the basic storage and lookup operations of a database engine. In fact, maps are sometimes referred to as “data dictionaries,” and they can be used for many tasks related to database operations, such as data translation.

The need for associated containers became evident when programmers had to store large amounts of data and realized that constantly searching an array was inefficient. An associated container, by contrast, offers virtual one-step access to an element ...

Get C++ for the Impatient now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.