{"id":77176,"date":"2026-02-24T05:06:27","date_gmt":"2026-02-23T21:06:27","guid":{"rendered":"https:\/\/www.wsisp.com\/helps\/77176.html"},"modified":"2026-02-24T05:06:27","modified_gmt":"2026-02-23T21:06:27","slug":"stl-map%e4%b8%8emultimap%e6%a0%b8%e5%bf%83%e6%8c%87%e5%8d%97","status":"publish","type":"post","link":"https:\/\/www.wsisp.com\/helps\/77176.html","title":{"rendered":"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357"},"content":{"rendered":"<h4>STL map\/multimap&#xff1a;\u63a5\u53e3\u4f7f\u7528\u4e0e\u6838\u5fc3\u7279\u6027\u8be6\u89e3<\/h4>\n<p>STL&#xff08;\u6807\u51c6\u6a21\u677f\u5e93&#xff09;\u4e2d\u7684map\u548cmultimap\u662f\u5173\u8054\u5bb9\u5668&#xff0c;\u7528\u4e8e\u5b58\u50a8\u952e\u503c\u5bf9&#xff08;key-value pairs&#xff09;\u3002\u5b83\u4eec\u57fa\u4e8e\u6709\u5e8f\u4e8c\u53c9\u6811&#xff08;\u901a\u5e38\u662f\u7ea2\u9ed1\u6811&#xff09;\u5b9e\u73b0&#xff0c;\u4fdd\u8bc1\u5143\u7d20\u6309\u952e\u6392\u5e8f\u3002map\u8981\u6c42\u952e\u552f\u4e00&#xff0c;\u6bcf\u4e2a\u952e\u53ea\u5bf9\u5e94\u4e00\u4e2a\u503c&#xff1b;multimap\u5219\u5141\u8bb8\u952e\u91cd\u590d&#xff0c;\u4e00\u4e2a\u952e\u53ef\u5bf9\u5e94\u591a\u4e2a\u503c\u3002\u4e0b\u9762\u6211\u5c06\u9010\u6b65\u8be6\u89e3\u5b83\u4eec\u7684\u63a5\u53e3\u4f7f\u7528\u548c\u6838\u5fc3\u7279\u6027\u3002<\/p>\n<h5>1. map\u548cmultimap\u7684\u57fa\u672c\u6982\u5ff5<\/h5>\n<ul>\n<li>map&#xff1a;\u5b58\u50a8\u552f\u4e00\u952e\u7684\u952e\u503c\u5bf9&#xff0c;\u4f8b\u5982\u5b58\u50a8\u5b66\u751fID&#xff08;\u952e&#xff09;\u548c\u59d3\u540d&#xff08;\u503c&#xff09;&#xff0c;ID\u4e0d\u80fd\u91cd\u590d\u3002<\/li>\n<li>multimap&#xff1a;\u5141\u8bb8\u952e\u91cd\u590d&#xff0c;\u9002\u7528\u4e8e\u4e00\u4e2a\u952e\u5bf9\u5e94\u591a\u4e2a\u503c\u7684\u573a\u666f&#xff0c;\u4f8b\u5982\u5b58\u50a8\u8bfe\u7a0b\u4ee3\u7801&#xff08;\u952e&#xff09;\u548c\u5b66\u751f\u540d\u5355&#xff08;\u503c&#xff09;\u3002<\/li>\n<li>\u4e24\u8005\u90fd\u6309\u952e\u81ea\u52a8\u6392\u5e8f&#xff0c;\u9ed8\u8ba4\u6309\u5347\u5e8f\u6392\u5217&#xff08;\u53ef\u81ea\u5b9a\u4e49\u6bd4\u8f83\u51fd\u6570&#xff09;\u3002<\/li>\n<\/ul>\n<h5>2. \u63a5\u53e3\u4f7f\u7528\u8be6\u89e3<\/h5>\n<p>\u63a5\u53e3\u5305\u62ec\u6784\u9020\u51fd\u6570\u3001\u63d2\u5165\u3001\u8bbf\u95ee\u3001\u5220\u9664\u548c\u8fed\u4ee3\u64cd\u4f5c\u3002\u4ee5\u4e0b\u7528C&#043;&#043;\u4ee3\u7801\u793a\u4f8b\u8bf4\u660e\u3002<\/p>\n<h6>2.1 \u521b\u5efa\u548c\u521d\u59cb\u5316<\/h6>\n<p>\u4f7f\u7528std::map\u6216std::multimap\u5934\u6587\u4ef6&#xff0c;\u5e76\u6307\u5b9a\u952e\u548c\u503c\u7c7b\u578b\u3002<\/p>\n<p>#include &lt;map&gt;<br \/>\n#include &lt;iostream&gt;<\/p>\n<p>int main() {<br \/>\n    \/\/ \u521b\u5efamap&#xff0c;\u952e\u7c7b\u578bint&#xff0c;\u503c\u7c7b\u578bstd::string<br \/>\n    std::map&lt;int, std::string&gt; studentMap;<\/p>\n<p>    \/\/ \u521b\u5efamultimap&#xff0c;\u952e\u7c7b\u578bstd::string&#xff0c;\u503c\u7c7b\u578bint<br \/>\n    std::multimap&lt;std::string, int&gt; courseMultimap;<\/p>\n<p>    \/\/ \u521d\u59cb\u5316\u65b9\u5f0f&#xff1a;\u63d2\u5165\u5143\u7d20\u6216\u4f7f\u7528\u5217\u8868\u521d\u59cb\u5316<br \/>\n    studentMap &#061; {{101, &#034;Alice&#034;}, {102, &#034;Bob&#034;}};<br \/>\n    courseMultimap.insert({&#034;Math&#034;, 90});<br \/>\n    courseMultimap.insert({&#034;Math&#034;, 85}); \/\/ \u952e\u53ef\u91cd\u590d<br \/>\n    return 0;<br \/>\n}<\/p>\n<h6>2.2 \u63d2\u5165\u5143\u7d20<\/h6>\n<ul>\n<li>insert()&#xff1a;\u63d2\u5165\u952e\u503c\u5bf9\u3002\u5bf9\u4e8emap&#xff0c;\u5982\u679c\u952e\u5df2\u5b58\u5728&#xff0c;\u63d2\u5165\u5931\u8d25&#xff1b;\u5bf9\u4e8emultimap&#xff0c;\u952e\u53ef\u91cd\u590d\u3002<\/li>\n<li>emplace()&#xff1a;\u9ad8\u6548\u6784\u9020\u5143\u7d20&#xff08;\u907f\u514d\u4e34\u65f6\u5bf9\u8c61&#xff09;\u3002<\/li>\n<\/ul>\n<p>\/\/ map\u63d2\u5165\u793a\u4f8b<br \/>\nstudentMap.insert(std::make_pair(103, &#034;Charlie&#034;)); \/\/ \u63d2\u5165\u6210\u529f<br \/>\nauto result &#061; studentMap.insert({101, &#034;Alex&#034;}); \/\/ \u952e101\u5df2\u5b58\u5728&#xff0c;\u63d2\u5165\u5931\u8d25<\/p>\n<p>\/\/ multimap\u63d2\u5165\u793a\u4f8b<br \/>\ncourseMultimap.emplace(&#034;Science&#034;, 95); \/\/ \u4f7f\u7528emplace<br \/>\ncourseMultimap.insert({&#034;Science&#034;, 88}); \/\/ \u952e\u53ef\u91cd\u590d\u63d2\u5165<\/p>\n<h6>2.3 \u8bbf\u95ee\u5143\u7d20<\/h6>\n<ul>\n<li>operator[] (\u4ec5map)&#xff1a;\u901a\u8fc7\u952e\u8bbf\u95ee\u503c&#xff08;\u5982\u679c\u952e\u4e0d\u5b58\u5728&#xff0c;\u81ea\u52a8\u63d2\u5165\u9ed8\u8ba4\u503c&#xff09;\u3002<\/li>\n<li>find()&#xff1a;\u8fd4\u56de\u8fed\u4ee3\u5668\u6307\u5411\u5339\u914d\u5143\u7d20&#xff08;\u672a\u627e\u5230\u8fd4\u56deend()&#xff09;\u3002<\/li>\n<li>at() (\u4ec5map)&#xff1a;\u5b89\u5168\u8bbf\u95ee&#xff0c;\u952e\u4e0d\u5b58\u5728\u629b\u51fa\u5f02\u5e38\u3002<\/li>\n<li>equal_range() (\u591a\u7528\u4e8emultimap)&#xff1a;\u8fd4\u56de\u952e\u5339\u914d\u7684\u6240\u6709\u5143\u7d20\u8303\u56f4\u3002<\/li>\n<\/ul>\n<p>\/\/ map\u8bbf\u95ee\u793a\u4f8b<br \/>\nstd::cout &lt;&lt; studentMap[101]; \/\/ \u8f93\u51fa&#034;Alice&#034;<br \/>\nauto it &#061; studentMap.find(104); \/\/ \u672a\u627e\u5230&#xff0c;it &#061;&#061; studentMap.end()<br \/>\ntry {<br \/>\n    std::cout &lt;&lt; studentMap.at(105); \/\/ \u952e105\u4e0d\u5b58\u5728&#xff0c;\u629b\u51fastd::out_of_range<br \/>\n} catch (&#8230;) {}<\/p>\n<p>\/\/ multimap\u8bbf\u95ee\u793a\u4f8b<br \/>\nauto range &#061; courseMultimap.equal_range(&#034;Math&#034;);<br \/>\nfor (auto it &#061; range.first; it !&#061; range.second; &#043;&#043;it) {<br \/>\n    std::cout &lt;&lt; it-&gt;second; \/\/ \u8f93\u51fa\u6240\u6709&#034;Math&#034;\u5bf9\u5e94\u7684\u5206\u6570<br \/>\n}<\/p>\n<h6>2.4 \u5220\u9664\u5143\u7d20<\/h6>\n<ul>\n<li>erase()&#xff1a;\u5220\u9664\u6307\u5b9a\u952e\u6216\u8fed\u4ee3\u5668\u4f4d\u7f6e\u7684\u5143\u7d20\u3002<\/li>\n<li>clear()&#xff1a;\u6e05\u7a7a\u5bb9\u5668\u3002<\/li>\n<\/ul>\n<p>\/\/ map\u5220\u9664\u793a\u4f8b<br \/>\nstudentMap.erase(101); \/\/ \u5220\u9664\u952e101<br \/>\nauto it &#061; studentMap.find(102);<br \/>\nif (it !&#061; studentMap.end()) {<br \/>\n    studentMap.erase(it); \/\/ \u901a\u8fc7\u8fed\u4ee3\u5668\u5220\u9664<br \/>\n}<\/p>\n<p>\/\/ multimap\u5220\u9664\u793a\u4f8b<br \/>\nint count &#061; courseMultimap.erase(&#034;Science&#034;); \/\/ \u5220\u9664\u6240\u6709&#034;Science&#034;\u952e&#xff0c;\u8fd4\u56de\u5220\u9664\u6570\u91cf<br \/>\ncourseMultimap.clear(); \/\/ \u6e05\u7a7a<\/p>\n<h6>2.5 \u5927\u5c0f\u548c\u8fed\u4ee3<\/h6>\n<ul>\n<li>size()&#xff1a;\u8fd4\u56de\u5143\u7d20\u6570\u91cf\u3002<\/li>\n<li>empty()&#xff1a;\u68c0\u67e5\u5bb9\u5668\u662f\u5426\u4e3a\u7a7a\u3002<\/li>\n<li>\u8fed\u4ee3\u5668&#xff1a;begin(), end(), rbegin(), rend() \u7528\u4e8e\u904d\u5386\u3002<\/li>\n<\/ul>\n<p>\/\/ \u904d\u5386map\u793a\u4f8b<br \/>\nfor (auto it &#061; studentMap.begin(); it !&#061; studentMap.end(); &#043;&#043;it) {<br \/>\n    std::cout &lt;&lt; it-&gt;first &lt;&lt; &#034;: &#034; &lt;&lt; it-&gt;second &lt;&lt; std::endl; \/\/ \u6309\u952e\u6392\u5e8f\u8f93\u51fa<br \/>\n}<\/p>\n<p>\/\/ \u68c0\u67e5\u5927\u5c0f<br \/>\nif (!courseMultimap.empty()) {<br \/>\n    std::cout &lt;&lt; &#034;Elements: &#034; &lt;&lt; courseMultimap.size();<br \/>\n}<\/p>\n<h5>3. \u6838\u5fc3\u7279\u6027\u8be6\u89e3<\/h5>\n<h6>3.1 \u5185\u90e8\u6570\u636e\u7ed3\u6784<\/h6>\n<ul>\n<li>\u57fa\u4e8e\u7ea2\u9ed1\u6811&#xff08;\u81ea\u5e73\u8861\u4e8c\u53c9\u641c\u7d22\u6811&#xff09;&#xff0c;\u4fdd\u8bc1\u5143\u7d20\u6309\u952e\u6709\u5e8f\u5b58\u50a8\u3002<\/li>\n<li>\u7ea2\u9ed1\u6811\u7279\u6027&#xff1a;\u63d2\u5165\u3001\u5220\u9664\u548c\u67e5\u627e\u64cd\u4f5c\u7684\u5e73\u5747\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a$O(\\\\log n)$&#xff0c;\u5176\u4e2d$n$\u4e3a\u5143\u7d20\u6570\u91cf\u3002<\/li>\n<li>\u6392\u5e8f\u89c4\u5219&#xff1a;\u9ed8\u8ba4\u4f7f\u7528std::less&#xff08;\u5347\u5e8f&#xff09;&#xff0c;\u53ef\u901a\u8fc7\u81ea\u5b9a\u4e49\u6bd4\u8f83\u51fd\u6570\u4fee\u6539&#xff1a;\n<p>struct CaseInsensitiveCompare {<br \/>\n    bool operator()(const std::string&amp; a, const std::string&amp; b) const {<br \/>\n        return std::tolower(a[0]) &lt; std::tolower(b[0]);<br \/>\n    }<br \/>\n};<br \/>\nstd::map&lt;std::string, int, CaseInsensitiveCompare&gt; customMap;<\/p>\n<\/li>\n<\/ul>\n<h6>3.2 \u65f6\u95f4\u590d\u6742\u5ea6<\/h6>\n<ul>\n<li>\u4e3b\u8981\u64cd\u4f5c\u7684\u5e73\u5747\u65f6\u95f4\u590d\u6742\u5ea6\u4e3a$O(\\\\log n)$&#xff1a;\n<ul>\n<li>\u63d2\u5165&#xff1a;$O(\\\\log n)$&#xff08;\u7ea2\u9ed1\u6811\u5e73\u8861\u64cd\u4f5c&#xff09;\u3002<\/li>\n<li>\u5220\u9664&#xff1a;$O(\\\\log n)$\u3002<\/li>\n<li>\u67e5\u627e&#xff1a;$O(\\\\log n)$&#xff08;\u5982find(), operator[]&#xff09;\u3002<\/li>\n<\/ul>\n<\/li>\n<li>\u6700\u574f\u60c5\u51b5&#xff08;\u6811\u5931\u8861&#xff09;\u65f6\u95f4\u590d\u6742\u5ea6\u4ecd\u4e3a$O(\\\\log n)$&#xff0c;\u7ea2\u9ed1\u6811\u4fdd\u8bc1\u9ad8\u5ea6\u5e73\u8861\u3002<\/li>\n<li>\u7a7a\u95f4\u590d\u6742\u5ea6&#xff1a;$O(n)$&#xff0c;\u5b58\u50a8\u5143\u7d20\u548c\u6811\u8282\u70b9\u5f00\u9500\u3002<\/li>\n<\/ul>\n<h6>3.3 \u952e\u7684\u552f\u4e00\u6027\u4e0e\u6392\u5e8f<\/h6>\n<ul>\n<li>\u952e\u552f\u4e00\u6027&#xff1a;map\u5f3a\u5236\u952e\u552f\u4e00&#xff0c;\u63d2\u5165\u91cd\u590d\u952e\u65f6\u5931\u8d25&#xff08;insert\u8fd4\u56defalse&#xff09;&#xff1b;multimap\u5141\u8bb8\u952e\u91cd\u590d&#xff0c;\u9002\u7528\u4e8e\u4e00\u5bf9\u591a\u5173\u7cfb\u3002<\/li>\n<li>\u6392\u5e8f\u4fdd\u8bc1&#xff1a;\u5143\u7d20\u59cb\u7ec8\u6309\u952e\u6392\u5e8f&#xff0c;\u8fed\u4ee3\u65f6\u6309\u987a\u5e8f\u8f93\u51fa\u3002\u4f8b\u5982&#xff0c;\u6574\u6570\u952e\u4ece\u5c0f\u5230\u5927\u6392\u5217\u3002<\/li>\n<li>\u6027\u80fd\u4f18\u52bf&#xff1a;\u6709\u5e8f\u7ed3\u6784\u652f\u6301\u8303\u56f4\u67e5\u8be2&#xff08;\u5982lower_bound(), upper_bound()&#xff09;\u3002<\/li>\n<\/ul>\n<h6>3.4 \u6bd4\u8f83map\u4e0emultimap<\/h6>\n<ul>\n<li>map&#xff1a;\u9002\u7528\u4e8e\u952e\u552f\u4e00\u7684\u573a\u666f&#xff08;\u5982\u5b57\u5178\u3001\u914d\u7f6e\u8bbe\u7f6e&#xff09;&#xff0c;\u8bbf\u95ee\u7b80\u5355&#xff08;operator[]&#xff09;\u3002<\/li>\n<li>multimap&#xff1a;\u7528\u4e8e\u952e\u53ef\u91cd\u590d\u7684\u573a\u666f&#xff08;\u5982\u65e5\u5fd7\u5206\u7c7b\u3001\u591a\u503c\u6620\u5c04&#xff09;&#xff0c;\u8bbf\u95ee\u9700\u7528equal_range()\u3002<\/li>\n<li>\u9009\u62e9\u5efa\u8bae&#xff1a;\u5982\u679c\u9700\u8981\u552f\u4e00\u952e&#xff0c;\u4f18\u5148\u7528map&#xff1b;\u5982\u679c\u5141\u8bb8\u91cd\u590d&#xff0c;\u7528multimap\u3002<\/li>\n<\/ul>\n<h5>4. \u793a\u4f8b\u4ee3\u7801&#xff1a;\u7efc\u5408\u4f7f\u7528<\/h5>\n<p>\u4ee5\u4e0b\u4ee3\u7801\u5c55\u793amap\u548cmultimap\u7684\u57fa\u672c\u64cd\u4f5c\u3002<\/p>\n<p>#include &lt;map&gt;<br \/>\n#include &lt;iostream&gt;<br \/>\n#include &lt;string&gt;<\/p>\n<p>int main() {<br \/>\n    \/\/ map\u793a\u4f8b&#xff1a;\u5b58\u50a8\u5458\u5de5ID\u548c\u59d3\u540d<br \/>\n    std::map&lt;int, std::string&gt; employees;<br \/>\n    employees.insert({1, &#034;John&#034;});<br \/>\n    employees[2] &#061; &#034;Jane&#034;; \/\/ \u4f7f\u7528operator[]\u63d2\u5165<br \/>\n    employees.emplace(3, &#034;Doe&#034;);<\/p>\n<p>    std::cout &lt;&lt; &#034;Employee ID 2: &#034; &lt;&lt; employees.at(2) &lt;&lt; std::endl;<\/p>\n<p>    \/\/ multimap\u793a\u4f8b&#xff1a;\u5b58\u50a8\u90e8\u95e8\u548c\u591a\u5458\u5de5<br \/>\n    std::multimap&lt;std::string, std::string&gt; departments;<br \/>\n    departments.insert({&#034;IT&#034;, &#034;Alice&#034;});<br \/>\n    departments.insert({&#034;IT&#034;, &#034;Bob&#034;});<br \/>\n    departments.insert({&#034;HR&#034;, &#034;Charlie&#034;});<\/p>\n<p>    auto it &#061; departments.find(&#034;IT&#034;);<br \/>\n    if (it !&#061; departments.end()) {<br \/>\n        std::cout &lt;&lt; &#034;IT Department employees: &#034;;<br \/>\n        auto range &#061; departments.equal_range(&#034;IT&#034;);<br \/>\n        for (auto r &#061; range.first; r !&#061; range.second; &#043;&#043;r) {<br \/>\n            std::cout &lt;&lt; r-&gt;second &lt;&lt; &#034; &#034;;<br \/>\n        }<br \/>\n    }<br \/>\n    return 0;<br \/>\n}<\/p>\n<p>https:\/\/www.zhihu.com\/zvideo\/2009491638033089027<br \/>\nhttps:\/\/www.zhihu.com\/zvideo\/2009490910673655683<br \/>\nhttps:\/\/www.zhihu.com\/zvideo\/2009491638033089027\/<br \/>\nhttps:\/\/www.zhihu.com\/zvideo\/2009490910673655683\/<\/p>\n<p>https:\/\/www.zhihu.com\/zvideo\/2009491638033089027<br \/>\nhttps:\/\/www.zhihu.com\/zvideo\/2009490910673655683<br \/>\nhttps:\/\/www.zhihu.com\/zvideo\/2009491638033089027\/<br \/>\nhttps:\/\/www.zhihu.com\/zvideo\/2009490910673655683\/<\/p>\n<h5>5. \u603b\u7ed3<\/h5>\n<ul>\n<li>map\u548cmultimap\u662fSTL\u4e2d\u9ad8\u6548\u7684\u5173\u8054\u5bb9\u5668&#xff0c;\u57fa\u4e8e\u7ea2\u9ed1\u6811\u5b9e\u73b0&#xff0c;\u4fdd\u8bc1\u6709\u5e8f\u6027\u548c$O(\\\\log n)$\u65f6\u95f4\u590d\u6742\u5ea6\u64cd\u4f5c\u3002<\/li>\n<li>\u63a5\u53e3\u5305\u62ec\u63d2\u5165\u3001\u8bbf\u95ee\u3001\u5220\u9664\u548c\u8fed\u4ee3\u65b9\u6cd5&#xff0c;map\u9002\u5408\u952e\u552f\u4e00\u573a\u666f&#xff0c;multimap\u652f\u6301\u952e\u91cd\u590d\u3002<\/li>\n<li>\u6838\u5fc3\u7279\u6027&#xff1a;\u5185\u90e8\u6709\u5e8f\u3001\u6027\u80fd\u7a33\u5b9a\u3001\u952e\u7ba1\u7406\u7075\u6d3b\u3002\u5728\u5b9e\u9645\u5f00\u53d1\u4e2d&#xff0c;\u6839\u636e\u952e\u552f\u4e00\u6027\u9700\u6c42\u9009\u62e9\u5408\u9002\u5bb9\u5668&#xff0c;\u4ee5\u4f18\u5316\u6570\u636e\u5b58\u50a8\u548c\u67e5\u8be2\u6548\u7387\u3002<\/li>\n<\/ul>\n<p>\u901a\u8fc7\u4ee5\u4e0a\u8be6\u89e3&#xff0c;\u60a8\u5e94\u80fd\u719f\u7ec3\u4f7f\u7528map\u548cmultimap\u7684\u63a5\u53e3&#xff0c;\u5e76\u7406\u89e3\u5176\u5185\u90e8\u673a\u5236\u3002\u5982\u679c\u60a8\u6709\u7279\u5b9a\u573a\u666f\u7684\u95ee\u9898&#xff0c;\u53ef\u4ee5\u63d0\u4f9b\u66f4\u591a\u7ec6\u8282&#xff0c;\u6211\u5c06\u8fdb\u4e00\u6b65\u89e3\u7b54&#xff01;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>STL map\/multimap&#xff1a;\u63a5\u53e3\u4f7f\u7528\u4e0e\u6838\u5fc3\u7279\u6027\u8be6\u89e3STL&#xff08;\u6807\u51c6\u6a21\u677f\u5e93&#xff09;\u4e2d\u7684map\u548cmultimap\u662f\u5173\u8054\u5bb9\u5668&#xff0c;\u7528\u4e8e\u5b58\u50a8\u952e\u503c\u5bf9&#xff08;key-value pairs&#xff09;\u3002\u5b83\u4eec\u57fa\u4e8e\u6709\u5e8f\u4e8c\u53c9\u6811&#xff08;\u901a\u5e38\u662f\u7ea2\u9ed1\u6811&#xff09;\u5b9e\u73b0&#xff0c;\u4fdd\u8bc1\u5143\u7d20\u6309\u952e\u6392\u5e8f\u3002map\u8981\u6c42\u952e\u552f\u4e00&#xff0c;\u6bcf\u4e2a\u952e\u53ea\u5bf9\u5e94\u4e00\u4e2a\u503c&#xff1b;multimap\u5219\u5141\u8bb8\u952e\u91cd\u590d&#xff0c;\u4e00\u4e2a\u952e\u53ef\u5bf9\u5e94\u591a\u4e2a\u503c\u3002<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[99,190,427],"topic":[],"class_list":["post-77176","post","type-post","status-publish","format-standard","hentry","category-server","tag-java","tag-190","tag-427"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.3 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wsisp.com\/helps\/77176.html\" \/>\n<meta property=\"og:locale\" content=\"zh_CN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"og:description\" content=\"STL map\/multimap&#xff1a;\u63a5\u53e3\u4f7f\u7528\u4e0e\u6838\u5fc3\u7279\u6027\u8be6\u89e3STL&#xff08;\u6807\u51c6\u6a21\u677f\u5e93&#xff09;\u4e2d\u7684map\u548cmultimap\u662f\u5173\u8054\u5bb9\u5668&#xff0c;\u7528\u4e8e\u5b58\u50a8\u952e\u503c\u5bf9&#xff08;key-value pairs&#xff09;\u3002\u5b83\u4eec\u57fa\u4e8e\u6709\u5e8f\u4e8c\u53c9\u6811&#xff08;\u901a\u5e38\u662f\u7ea2\u9ed1\u6811&#xff09;\u5b9e\u73b0&#xff0c;\u4fdd\u8bc1\u5143\u7d20\u6309\u952e\u6392\u5e8f\u3002map\u8981\u6c42\u952e\u552f\u4e00&#xff0c;\u6bcf\u4e2a\u952e\u53ea\u5bf9\u5e94\u4e00\u4e2a\u503c&#xff1b;multimap\u5219\u5141\u8bb8\u952e\u91cd\u590d&#xff0c;\u4e00\u4e2a\u952e\u53ef\u5bf9\u5e94\u591a\u4e2a\u503c\u3002\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wsisp.com\/helps\/77176.html\" \/>\n<meta property=\"og:site_name\" content=\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\" \/>\n<meta property=\"article:published_time\" content=\"2026-02-23T21:06:27+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"\u4f5c\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 \u5206\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77176.html\",\"url\":\"https:\/\/www.wsisp.com\/helps\/77176.html\",\"name\":\"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"isPartOf\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\"},\"datePublished\":\"2026-02-23T21:06:27+00:00\",\"dateModified\":\"2026-02-23T21:06:27+00:00\",\"author\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.wsisp.com\/helps\/77176.html#breadcrumb\"},\"inLanguage\":\"zh-Hans\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wsisp.com\/helps\/77176.html\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/77176.html#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"\u9996\u9875\",\"item\":\"https:\/\/www.wsisp.com\/helps\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#website\",\"url\":\"https:\/\/www.wsisp.com\/helps\/\",\"name\":\"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3\",\"description\":\"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"zh-Hans\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"zh-Hans\",\"@id\":\"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"contentUrl\":\"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery\",\"caption\":\"admin\"},\"sameAs\":[\"http:\/\/wp.wsisp.com\"],\"url\":\"https:\/\/www.wsisp.com\/helps\/author\/admin\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.wsisp.com\/helps\/77176.html","og_locale":"zh_CN","og_type":"article","og_title":"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","og_description":"STL map\/multimap&#xff1a;\u63a5\u53e3\u4f7f\u7528\u4e0e\u6838\u5fc3\u7279\u6027\u8be6\u89e3STL&#xff08;\u6807\u51c6\u6a21\u677f\u5e93&#xff09;\u4e2d\u7684map\u548cmultimap\u662f\u5173\u8054\u5bb9\u5668&#xff0c;\u7528\u4e8e\u5b58\u50a8\u952e\u503c\u5bf9&#xff08;key-value pairs&#xff09;\u3002\u5b83\u4eec\u57fa\u4e8e\u6709\u5e8f\u4e8c\u53c9\u6811&#xff08;\u901a\u5e38\u662f\u7ea2\u9ed1\u6811&#xff09;\u5b9e\u73b0&#xff0c;\u4fdd\u8bc1\u5143\u7d20\u6309\u952e\u6392\u5e8f\u3002map\u8981\u6c42\u952e\u552f\u4e00&#xff0c;\u6bcf\u4e2a\u952e\u53ea\u5bf9\u5e94\u4e00\u4e2a\u503c&#xff1b;multimap\u5219\u5141\u8bb8\u952e\u91cd\u590d&#xff0c;\u4e00\u4e2a\u952e\u53ef\u5bf9\u5e94\u591a\u4e2a\u503c\u3002","og_url":"https:\/\/www.wsisp.com\/helps\/77176.html","og_site_name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","article_published_time":"2026-02-23T21:06:27+00:00","author":"admin","twitter_card":"summary_large_image","twitter_misc":{"\u4f5c\u8005":"admin","\u9884\u8ba1\u9605\u8bfb\u65f6\u95f4":"3 \u5206"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wsisp.com\/helps\/77176.html","url":"https:\/\/www.wsisp.com\/helps\/77176.html","name":"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357 - \u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","isPartOf":{"@id":"https:\/\/www.wsisp.com\/helps\/#website"},"datePublished":"2026-02-23T21:06:27+00:00","dateModified":"2026-02-23T21:06:27+00:00","author":{"@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41"},"breadcrumb":{"@id":"https:\/\/www.wsisp.com\/helps\/77176.html#breadcrumb"},"inLanguage":"zh-Hans","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wsisp.com\/helps\/77176.html"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.wsisp.com\/helps\/77176.html#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"\u9996\u9875","item":"https:\/\/www.wsisp.com\/helps"},{"@type":"ListItem","position":2,"name":"STL map\u4e0emultimap\u6838\u5fc3\u6307\u5357"}]},{"@type":"WebSite","@id":"https:\/\/www.wsisp.com\/helps\/#website","url":"https:\/\/www.wsisp.com\/helps\/","name":"\u7f51\u7855\u4e92\u8054\u5e2e\u52a9\u4e2d\u5fc3","description":"\u9999\u6e2f\u670d\u52a1\u5668_\u9999\u6e2f\u4e91\u670d\u52a1\u5668\u8d44\u8baf_\u670d\u52a1\u5668\u5e2e\u52a9\u6587\u6863_\u670d\u52a1\u5668\u6559\u7a0b","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wsisp.com\/helps\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"zh-Hans"},{"@type":"Person","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/358e386c577a3ab51c4493330a20ad41","name":"admin","image":{"@type":"ImageObject","inLanguage":"zh-Hans","@id":"https:\/\/www.wsisp.com\/helps\/#\/schema\/person\/image\/","url":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","contentUrl":"https:\/\/gravatar.wp-china-yes.net\/avatar\/?s=96&d=mystery","caption":"admin"},"sameAs":["http:\/\/wp.wsisp.com"],"url":"https:\/\/www.wsisp.com\/helps\/author\/admin"}]}},"_links":{"self":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/77176","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/comments?post=77176"}],"version-history":[{"count":0,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/posts\/77176\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/media?parent=77176"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/categories?post=77176"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/tags?post=77176"},{"taxonomy":"topic","embeddable":true,"href":"https:\/\/www.wsisp.com\/helps\/wp-json\/wp\/v2\/topic?post=77176"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}