⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mmap.htm

📁 这是关于VC++中的STL容器的资料,包括了STL容器各个类之间关系以及类的说明
💻 HTM
字号:
<html>
<head>
<title> The multimap Class</title>
</head>

<body bgcolor="#FFFFFF">

<img src="mmapban.gif">

<pre>
<font size=5>Class Name</font>            multimap

<font size=5>Header File</font>           &lt;map&gt;

<font size=5>Classification</font>      Container
</pre>

<a href="mmap.htm#desc">Class Description</a><br>
<h1>Member Classes</h1>

<i>None</i>


<h1>Methods</h1>
<pre>

<a href="common.htm#begin">iterator begin()</a><br>
<a href="common.htm#begin">const_iterator begin() const</a><br>
<a href="list.htm#clear">void clear()</a><br>
<a href="assoc.htm#count">size_type count(const key_type& x) const</a><br>
<a href="common.htm#empty">bool empty() const</a><br>
<a href="common.htm#end">iterator end()</a><br>
<a href="common.htm#end">const_iterator end() const</a><br>
<a href="assoc.htm#erase1">void erase(iterator position)</a><br>
<a href="assoc.htm#erase2">size_type erase(const key_type& x)</a><br>
<a href="assoc.htm#erase3">void erase(iterator first, iterator last)</a><br>
<a href="assoc.htm#equal">pair&lt;iterator,iterator&gt; equal_range(const key_type& x) const</a><br>
<a href="assoc.htm#find1">iterator find(const key_type& x) const</a><br>
<a href="assoc.htm#find1">const_iterator find(const key_type& x) const</a><br>
<a href="list.htm#getallocator">allocator_type get_allocator() const</a><br>
<a href="assoc.htm#insert1">pair&lt;iterator,bool&gt; insert(const value_type& x)</a><br>
<a href="assoc.htm#insert2">iterator insert(iterator position, const value_type& x)</a><br>
<a href="assoc.htm#insert3">template &lt;class InputIterator&gt;void insert(InputIterator first, InputIterator last)</a><br>
<a href="assoc.htm#lower">iterator lower_bound(const key_type& x) const</a><br>
<a href="assoc.htm#lower">const_iterator lower_bound(const key_type& x) const</a><br>
<a href="mmap.htm#map1">explicit multimap(const Compare& comp = Compare(), const Allocator& = Allocator())</a><br>
<a href="mmap.htm#map2">template &lt;class InputIterator&gt; multimap(InputIterator first, InputIterator last, const Compare& comp = Compare(), const Allocator& = Allocator())</a><br>
<a href="mmap.htm#map3">multimap(const map&lt;Key,T,Compare,Allocator&gt;& x)</a><br>
<a href="mmap.htm#map4">~multimap()</a><br>
<a href="common.htm#maxsize">size_type max_size() const</a><br>
<a href="common.htm#rbegin">reverse_iterator rbegin()</a><br>
<a href="common.htm#rbegin">const_reverse_iterator rbegin() const</a><br>
<a href="common.htm#rend">reverse_iterator rend()</a><br>
<a href="list.htm#resize">void resize(size_type Sz, T C = T())</a><br>
<a href="common.htm#rend">const_reverse_iterator rend() const</a><br>
<a href="common.htm#size">size_type size() const</a><br>
<a href="mmap.htm#swap">void swap(multimap<Key,T,Compare,Allocator>&)</a><br>
<a href="assoc.htm#upper">iterator upper_bound(const key_type& x) const</a><br>
<a href="assoc.htm#upper">const_iterator upper_bound(const key_type& x) const</a><br>
</pre>

<h2>Operators</h2>

reference operator[](const key_type& x);
multimap&lt;Key,T,Compare,Allocator&gt;& operator=(const multimap&lt;Key,T,Compare,Allocator&gt;& x);


<a name="desc"><h3>Class Description</h3></a>
<p>
The multimap collection is a special type of <i>multiset</i>. The multimap collection is used to
create a collection of related pairs. Whereas the map includes the unique pairs of related
items, the multimap may include duplicate pairs.  The multimap collection associates the 
elements of one set to the elements of another set.  Multimap collections are structured in the
same way as the map collection. The elements in the collection are pairs. The difference between 
a multimap and a map collection is the multimap collection allows key duplication.
In other words, the same key can be associated with different values.
</p>
<hr>

<pre>
<a name="swap">Method            swap()</a>

Access            Public

Classification    Modifier

Syntax            void swap(multimap&lt;Key,T,Compare,Allocator&gt;& X)

Parameters        X is the multimap to be swapped with the contents of the current multimap.

Return            X is the multimap to be swapped.

</pre>

<h3>Description</h3>
<p>

The swap() method swaps the contents of the current multimap with multimap X.

</p>
<hr>

<pre>
<a name="map1">Method            multimap()</a>

Access            Public

Classification    Constructor

Syntax            explicit multimap(const Compare& Comp = Compare(), const Allocator &X = Allocator())

Parameters        Comp is the function object that will be used to order the multimap.
                  X is a allocator object.

Return            None.

</pre>

<h3>Description</h3>
<p>

The multimap() method constructs an empty set container.

</p>
<hr>

<pre>
<a name="map2">Method            multimap()</a>

Access            Public

Classification    Constructor

Syntax            template &lt;class InputIterator&gt; multimap(InputIterator first, InputIterator last,const Compare& Comp = Compare(), const Allocator&X = Allocator())

Parameters        elements from the range [first,last) will be used to construct the multimap. X is a allocator object.
                  Comp is the function object that will be used to order the multimap.

Return            None.

</pre>

<h3>Description</h3>
<p>

The multimap() method constructs a multimap that contains copies of the objects that are pointed to by the
iterators in the range [first,last].
</p>
<hr>

<pre>
<a name="map3">Method            multimap()</a>

Access            Public

Classification    Constructor

Syntax            multimap(const multimap&lt;Key,Compare,Allocator&gt;& X)

Parameters        X is the multimap that will be used to construct the new multimap.
                
Return            None.

</pre>

<h3>Description</h3>
<p>

The multimap() method constructs a  new set from multimap X.
</p>
<hr>

<pre>
<a name="map4">Method            multimap()</a>

Access            Public

Classification    Destructor

Syntax            ~multimap()

Parameters        None.
                
Return            None.

</pre>

<h3>Description</h3>
<p>

The ~multimap() method destructs a multimap object.
</p>
<hr>


</body>
</html>





⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -