Map and set allow only the same keys to appear once, while Multimap and multiset allow multiple occurrences.
1. Introduction--pair Type:
Pair needs to add header file utility header file
Make_pair<v1,v2> creates a new pair object with Values V1 and V2, and the two types of this pair object are the types of these two values
Pair<t1,t2> (V1,V2)
pair<t1,t2> If you do not provide an initialization when creating a pair object, the default constructor is used to initialize the
P First P Second These two data members are common data members
2. Map type
Map must contain the map header file
The only constraint for a key type is that the < operator must be supported.
Strict weak ordering must be defined on the key type (that is, strict on the key exists less than the relationship).
(1) Type of map definition
The type of the Map<k,v>::key_type key.
map<k,v The type of the value that the >::mapped_type key is associated with.
Map<k,v>::value_type a pair type, but the key is const and cannot be modified.
10.--pair,map,set,multimap,multiset