And map with a different set multiset, multimap of

Since the elements can not be duplicated, the insertion of a single insert element in the set of member functions and multiset differ prototype is as follows:

pair<iterator, bool> insert(const T & val);

If the return value of the function insert member is set pair template class object x, if x.second is true, then the successful insertion at this time is the iterator x.first element is inserted; x.second if false, the Note to insert an element already in the container, this time x.first iterator is pointing to the original elements.

 

Similar map.

Guess you like

Origin www.cnblogs.com/cqu-qxl/p/11527503.html