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

📄 equal_range.html

📁 从www.CppReference.com打包的C++参考手册
💻 HTML
字号:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head>  <meta name="generator" content=  "HTML Tidy for Linux/x86 (vers 1 September 2005), see www.w3.org">  <title>equal_range</title>  <link href="../cppreference.css" rel="stylesheet" type="text/css"></head><body><table>  <tr>  <td>  <div class="body-content">  <div class="header-box">    <a href="../index.html">cppreference.com</a> &gt; <a href=    "index.html">C++ Multimaps</a> &gt; <a href=    "equal_range.html">equal_range</a>  </div>  <div class="name-format">    equal_range  </div>  <div class="syntax-name-format">    Syntax:  </div>  <pre class="syntax-box">  #include &lt;map&gt;  pair&lt;iterator, iterator&gt; equal_range( const <a href="../containers.html">key_type</a>&amp; key );</pre>  <p>The function equal_range() returns two iterators - one to the  first element that contains <em>key</em>, another to a point just  after the last element that contains <em>key</em>.</p>  <p>For example, here is a hypothetical input-configuration loader  using multimaps, strings and equal_range():</p>    <pre class="example-code">  multimap&lt;string,pair&lt;int,int&gt; &gt; input_config;    // read configuration from file "input.conf" to input_config  readConfigFile( input_config, "input.conf" );     pair&lt;multimap&lt;string,pair&lt;int,int&gt; &gt;::iterator,multimap&lt;string,pair&lt;int,int&gt; &gt;::iterator&gt; ii;  multimap&lt;string,pair&lt;int,int&gt; &gt;::iterator i;    ii = input_config.equal_range("key");         // keyboard key-bindings  // we can iterate over a range just like with begin() and end()    for( i = ii.first; i != ii.second; ++i ) {    // add a key binding with this key and output    bindkey(i->second.first, i->second.second);   }  ii = input_config.equal_range("joyb");        // joystick button key-bindings  for( i = ii.first; i != ii.second; ++i ) {    // add a key binding with this joystick button and output    bindjoyb(i->second.first, i->second.second);  }  </pre>  </div>  </td>    </tr>  </table></body></html>

⌨️ 快捷键说明

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