Jump to content

C++ Language/Std/Stl/CollectionClasses/SortedCollections/Map/Indexing

From Wikibooks, open books for an open world

A map can be indexed-by-key (a lookup operation). Use either the C-array-operator, the at() function, or the find() function. These differ in how they deal with a non-existent key.

Additional information about map indexing (includes interactive examples)