73 total contributions
The .erase() method removes an element by it’s key from a map.
.erase()
mapName.erase(key);
The key is the element to be erased.
key
The following codebyte example uses .erase() to remove an element from the fields map:
fields
usVisit uscodeHide codeCodeOutputHide outputHide outputLoading...Run
271 total contributions
222 total contributions