Jump to content

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

From Wikibooks, open books for an open world

Initializing a map from a literal value uses nested-brace-syntax:
std::map<char,int> mapciVar
  = {{'a',0}, {'e',11}, {'i',22}, {'o',33}};

Additional information about map construction