Skip to main content

  | मौसम…

411 समाचार
Public archive edition · Attributed source reporting with original dates · AI drafts are excluded

411 REFERENCE · Wikibooks

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

Reference material by Wikibooks contributors. This retains its source identity and is not 411 news reporting.

The distinction between a map's insert() and emplace functions is the same as it was for vectors. With a map, you could also use C-array-indexing syntax, which will insert a new item if the map didn't already contain one with that key. Additional information about inserting items into a map (includes interactive examples)