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

📄 common.htm

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

<body bgcolor="#FFFFFF">
<pre>
<font size=4 color=green>Class Name</font>        Common Container Methods<br>
Classification    Sequence  and Associative Containers<br>


<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="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="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="common.htm#rend">const_reverse_iterator rend() const</a><br>
<a href="common.htm#size">size_type size() const</a><br>


</pre>



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

Access            Public

Classification    Accessor

Syntax            iterator begin()

Parameters        None
                                                             

Return            This method returns a iterator(or const iterator for a const container)
                  that points to the first object in the container.
  
                 
                  
</pre>

<h3>Description</h3>
<p>

The begin() method returns a iterator that points to the first object in the container.
</p>
<hr>


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

Access            Public

Classification    Accessor

Syntax            bool empty() const

Parameters        None
                                                             
Return            returns true if the container is empty and false otherwise.                                  
</pre>


<h3>Description</h3>
<p>

The empty() method returns true if size() == 0 and false otherwise.
</p>
<hr>

<pre>                                
<a name="maxsize">Method            max_size()</a>

Access            Public

Classification    Accessor

Syntax            size_type max_size() const

Parameters        None
                                                             

Return            This method returns the largest number of objects that the
                  container can hold.
                 
                  
</pre>

<h3>Description</h3>
<p>

The max_size() method returns the largest number of objects that this container
can hold.  This value is influenced by memory model and allocator in effect.

</p>
<hr>



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

Access            Public

Classification    Accessor

Syntax            iterator end()

Parameters        None
                                                             

Return            This method returns a iterator(or const iterator for a const container)
                  that points to some value that is past the last object in the container.

                 
                  
</pre>

<h3>Description</h3>
<p>

The end() method returns a iterator that points to a past-the-end value.  It points to some
value that is after the last object in the container.
</p>
<hr>


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

Access            Public

Classification    Accessor

Syntax            reverse_iterator rbegin()

Parameters        None
                                                             

Return            This method returns a reverse_iterator (or a const reverse_iterator  for
                  const containers) that points at the first object in container from
                  end opposite of begin().
                  
</pre>

<h3>Description</h3>
<p>

The rbegin() method returns a iterator that can be used to traverse the container in reverse
order. Whichever location begin() points to, rbegin points to the opposite end of the container.
</p>
<hr>

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

Access            Public

Classification    Accessor

Syntax            reverse_iterator rend()

Parameters        None
                                                             

Return            This method returns a reverse_iterator (or a const reverse_iterator  for
                  const containers) that points beyond the last object in container from
                  from the reverse order.
                  
</pre>

<h3>Description</h3>
<p>

The rend() method returns a iterator that can be used to test the end of a reverse
traversal through a container. The rend() method returns a reverse_iterator that points
beyond the last object in the container when moving from last object in the container
to the first object.
</p>
<hr>


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

Access            Public

Classification    Accessor

Syntax            size_type size() const

Parameters        None
                                                             

Return            This method returns the number of objects in a container.


</pre>

<h3>Description</h3>
<p>

This method does not return how much memory the container requires. It returns the number
of objects that are contained in the container.  The memory requirements can be calculated
by using the size() method * the appropriate size of the objects in the container + the
size of the data members of the container.

</p>
<hr>


</body>
</html>



⌨️ 快捷键说明

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