1<?xml version="1.0" encoding="UTF-8" standalone="no"?> 2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 3<html xmlns="http://www.w3.org/1999/xhtml"> 4 <head> 5 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> 6 <title>count</title> 7 <link rel="stylesheet" href="apiReference.css" type="text/css" /> 8 <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> 9 <link rel="start" href="index.html" title="Berkeley DB C++ Standard Template Library API Reference" /> 10 <link rel="up" href="db_map.html" title="Chapter��5.�� Db_map" /> 11 <link rel="prev" href="stldb_mapequal_range.html" title="equal_range" /> 12 <link rel="next" href="stldb_mapupper_bound.html" title="upper_bound" /> 13 </head> 14 <body> 15 <div class="navheader"> 16 <table width="100%" summary="Navigation header"> 17 <tr> 18 <th colspan="3" align="center"> 19count 20</th> 21 </tr> 22 <tr> 23 <td width="20%" align="left"><a accesskey="p" href="stldb_mapequal_range.html">Prev</a>��</td> 24 <th width="60%" align="center">Chapter��5.�� 25 Db_map </th> 26 <td width="20%" align="right">��<a accesskey="n" href="stldb_mapupper_bound.html">Next</a></td> 27 </tr> 28 </table> 29 <hr /> 30 </div> 31 <div class="sect1" lang="en" xml:lang="en"> 32 <div class="titlepage"> 33 <div> 34 <div> 35 <h2 class="title" style="clear: both"><a id="stldb_mapcount"></a> 36count 37</h2> 38 </div> 39 </div> 40 </div> 41 <div class="sect2" lang="en" xml:lang="en"> 42 <div class="titlepage"> 43 <div> 44 <div> 45 <h3 class="title"><a id="func_details"></a> 46Function Details</h3> 47 </div> 48 </div> 49 </div> 50 <pre class="programlisting"> 51size_type��count(const��key_type��&x)��const 52 </pre> 53 <div class="sect3" lang="en" xml:lang="en"> 54 <div class="titlepage"></div> 55 <p>Count the number of key/data pairs having specified key x. </p> 56 <p></p> 57 </div> 58 <div class="sect3" lang="en" xml:lang="en"> 59 <div class="titlepage"> 60 <div> 61 <div> 62 <h4 class="title"><a id="id1552551"></a> 63Parameters</h4> 64 </div> 65 </div> 66 </div> 67 <div class="sect4" lang="en" xml:lang="en"> 68 <div class="titlepage"> 69 <div> 70 <div> 71 <h5 class="title"><a id="id1552445"></a> 72 x </h5> 73 </div> 74 </div> 75 </div> 76 <p>The key to count. </p> 77 </div> 78 </div> 79 <div class="sect3" lang="en" xml:lang="en"> 80 <div class="titlepage"> 81 <div> 82 <div> 83 <h4 class="title"><a id="id1552504"></a> 84Return Value</h4> 85 </div> 86 </div> 87 </div> 88 <p>The number of key/data pairs having x as key within the container. </p> 89 </div> 90 <div class="sect3" lang="en" xml:lang="en"> 91 <div class="titlepage"> 92 <div> 93 <div> 94 <h4 class="title"><a id="id1552505"></a> 95See Also</h4> 96 </div> 97 </div> 98 </div> 99 <p> 100 </p> 101 <p><a class="ulink" href="http://www.cplusplus.com/reference/stl/map/count/" target="_top">http://www.cplusplus.com/reference/stl/map/count/</a> </p> 102 <p> </p> 103 </div> 104 </div> 105 <div class="sect2" lang="en" xml:lang="en"> 106 <div class="titlepage"> 107 <div> 108 <div> 109 <h3 class="title"><a id="id1552337"></a> 110Group: Searching Functions</h3> 111 </div> 112 </div> 113 </div> 114 <p>The following functions are returning iterators, and they by default return read-write iterators.</p> 115 <p>If you intend to use the returned iterator only to read, you should call the const version of each function using a const reference to this container. Using const iterators can potentially promote concurrency a lot. You can also set the readonly parameter to each non-const version of the functions to true if you don't use the returned iterator to write, which also promotes concurrency and overall performance. </p> 116 </div> 117 <div class="sect2" lang="en" xml:lang="en"> 118 <div class="titlepage"> 119 <div> 120 <div> 121 <h3 class="title"><a id="id1552321"></a> 122Class</h3> 123 </div> 124 </div> 125 </div> 126 <p> 127 <a class="link" href="db_map.html" title="Chapter��5.�� Db_map"> 128 db_map</a> 129 </p> 130 </div> 131 </div> 132 <div class="navfooter"> 133 <hr /> 134 <table width="100%" summary="Navigation footer"> 135 <tr> 136 <td width="40%" align="left"><a accesskey="p" href="stldb_mapequal_range.html">Prev</a>��</td> 137 <td width="20%" align="center"> 138 <a accesskey="u" href="db_map.html">Up</a> 139 </td> 140 <td width="40%" align="right">��<a accesskey="n" href="stldb_mapupper_bound.html">Next</a></td> 141 </tr> 142 <tr> 143 <td width="40%" align="left" valign="top"> 144equal_range 145��</td> 146 <td width="20%" align="center"> 147 <a accesskey="h" href="index.html">Home</a> 148 </td> 149 <td width="40%" align="right" valign="top">�� 150upper_bound 151</td> 152 </tr> 153 </table> 154 </div> 155 </body> 156</html> 157