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

From Wikibooks, open books for an open world
Jump to navigation Jump to search

The size() function reports how many items are in the map. The count('i') function reports how many items are in the map having that particular key (0 or 1 of them).

Additional information about map size (includes interactive examples)