June 2025
Intermediate to advanced
1093 pages
33h 24m
English
First, the containers can be roughly divided into four groups:
Sequence-based containersAccess and insertion in these containers occur either in order or element-wise with an index as a number. vector and array are examples. Typically, you delete and add elements at one or both ends. Some support efficient direct element access with [int] or at(int).
Associative ordered containersInstead of numbers, these use any data type for access. For example, associate the name of a city with its historical German postal code by writing cities["Berlin"s] = 1000. In such containers, you can insert elements at arbitrary positions. The associative containers are kept permanently sorted by their keys. ...
Read now
Unlock full access