<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[erase von std::map]]></title><description><![CDATA[<p>Hi,</p>
<p>kurze Frage:<br />
Sagen wir ich habe eine std::map&lt;int,char&gt; mymap; mit 3 Elementen:</p>
<pre><code class="language-cpp">mymap[2]='a';
mymap[3]='c';
mymap[11]='x';
</code></pre>
<pre><code class="language-cpp">mymap.erase(5);
</code></pre>
<p>Gibt es dann irgend welche Auswirkungen, wenn ich erase für einen Key aufrufe, den es NICHT in der Map gibt?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/262762/erase-von-std-map</link><generator>RSS for Node</generator><lastBuildDate>Sun, 06 Sep 2026 11:05:00 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/262762.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 10 Mar 2010 23:18:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to erase von std::map on Wed, 10 Mar 2010 23:18:34 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>kurze Frage:<br />
Sagen wir ich habe eine std::map&lt;int,char&gt; mymap; mit 3 Elementen:</p>
<pre><code class="language-cpp">mymap[2]='a';
mymap[3]='c';
mymap[11]='x';
</code></pre>
<pre><code class="language-cpp">mymap.erase(5);
</code></pre>
<p>Gibt es dann irgend welche Auswirkungen, wenn ich erase für einen Key aufrufe, den es NICHT in der Map gibt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1867253</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1867253</guid><dc:creator><![CDATA[ahahaahha@Real]]></dc:creator><pubDate>Wed, 10 Mar 2010 23:18:34 GMT</pubDate></item><item><title><![CDATA[Reply to erase von std::map on Wed, 10 Mar 2010 23:24:54 GMT]]></title><description><![CDATA[<p>Für solche Fragen ist es immer gut, eine <a href="http://www.cplusplus.com/reference/stl/map/erase/" rel="nofollow">Referenz</a> zu haben:</p>
<p><a href="http://www.cplusplus.com" rel="nofollow">www.cplusplus.com</a> schrieb:</p>
<blockquote>
<p>...the function returns the number of elements erased, which in map containers is 1 if an element with a key value of x existed (and thus was subsequently erased), and zero otherwise.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/1867257</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1867257</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Wed, 10 Mar 2010 23:24:54 GMT</pubDate></item></channel></rss>