ArbolOne <
Arbo...@gmail.com> schrieb:
Ordinary sets and a maps behave like this. Which element remains in the
container depends on the input method: a set stores always the last
added element, previously stored elements with the same key are removed
if you add a new one. A map shows the same behavior using the []
operator, but the insert method of a map refuses the insertion if an
element with that key already exists, so the first added element remains
in the container. Note: inserting values in large sets or maps can get
very slow because it's the most expensive operation on those containers.
T.M.