<?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[segmentation fault - Brett vor den Augen]]></title><description><![CDATA[<p>Hallo Leute</p>
<p>Ich kriegs gerade einfach nicht gebacken. Wo liegt das Problem?</p>
<pre><code class="language-cpp">template&lt;class KEY&gt;
class MapMaps
{
   public:
   MapMaps&amp; operator[]( KEY _key )
   {
      return Map[ _key ];
   }

   private:
   std::map&lt; KEY,MapMaps&lt;KEY&gt; &gt; Map;

};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/282060/segmentation-fault-brett-vor-den-augen</link><generator>RSS for Node</generator><lastBuildDate>Sun, 23 Aug 2026 09:42:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/282060.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 13 Feb 2011 12:10:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to segmentation fault - Brett vor den Augen on Sun, 13 Feb 2011 12:10:14 GMT]]></title><description><![CDATA[<p>Hallo Leute</p>
<p>Ich kriegs gerade einfach nicht gebacken. Wo liegt das Problem?</p>
<pre><code class="language-cpp">template&lt;class KEY&gt;
class MapMaps
{
   public:
   MapMaps&amp; operator[]( KEY _key )
   {
      return Map[ _key ];
   }

   private:
   std::map&lt; KEY,MapMaps&lt;KEY&gt; &gt; Map;

};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2020436</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2020436</guid><dc:creator><![CDATA[mightymighty]]></dc:creator><pubDate>Sun, 13 Feb 2011 12:10:14 GMT</pubDate></item><item><title><![CDATA[Reply to segmentation fault - Brett vor den Augen on Sun, 13 Feb 2011 12:36:08 GMT]]></title><description><![CDATA[<p>map.contains(key); ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2020453</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2020453</guid><dc:creator><![CDATA[padreigh]]></dc:creator><pubDate>Sun, 13 Feb 2011 12:36:08 GMT</pubDate></item><item><title><![CDATA[Reply to segmentation fault - Brett vor den Augen on Sun, 13 Feb 2011 13:31:31 GMT]]></title><description><![CDATA[<p>Wie gesagt, Brett vor den Augen. Obiges Codebeispiel funktioniert natürlich.</p>
<p>Die MapMaps Klasse hält noch eine weitere Membervariable einer etwas aufwändigeren Klasse.<br />
Wenn ich jetzt n'segmentation fault erhalte, schon beim Aufruf von:</p>
<pre><code class="language-cpp">MapMaps&lt;std::string&gt; MyMapMap;
MyMapMap[&quot;test&quot;];
</code></pre>
<p>An was kann das liegen? Fehler im Copy Constructor dieser Memberklasse oder etwas derartiges? Fehler im Defaultkonstruktor? Der verdammte Fehler will mir nicht ins Auge fallen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2020474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2020474</guid><dc:creator><![CDATA[mightymighty]]></dc:creator><pubDate>Sun, 13 Feb 2011 13:31:31 GMT</pubDate></item><item><title><![CDATA[Reply to segmentation fault - Brett vor den Augen on Sun, 13 Feb 2011 13:45:36 GMT]]></title><description><![CDATA[<p>copyconstructor...</p>
<p>Merci trotzdem, hat nur schon geholfen, mal zu notieren was überhaupt so möglich ist... <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2020476</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2020476</guid><dc:creator><![CDATA[mightymighty]]></dc:creator><pubDate>Sun, 13 Feb 2011 13:45:36 GMT</pubDate></item><item><title><![CDATA[Reply to segmentation fault - Brett vor den Augen on Sun, 13 Feb 2011 13:46:58 GMT]]></title><description><![CDATA[<p>mightymighty schrieb:</p>
<blockquote>
<p>Wo liegt das Problem?</p>
</blockquote>
<p>Du versuchst etwas, was nicht erlaubt ist. Zu dem Zeitpunkt, wo Du Map definierst, ist MapMaps&lt;KEY&gt; ein unvollständiger Typ. Du verletzt damit die Anforderungen des Klassentemplates MapMaps&lt;KEY&gt;.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2020477</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2020477</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sun, 13 Feb 2011 13:46:58 GMT</pubDate></item><item><title><![CDATA[Reply to segmentation fault - Brett vor den Augen on Sun, 13 Feb 2011 13:51:27 GMT]]></title><description><![CDATA[<p>krümelkacker schrieb:</p>
<blockquote>
<p>Du versuchst etwas, was nicht erlaubt ist. Zu dem Zeitpunkt, wo Du Map definierst, ist MapMaps&lt;KEY&gt; ein unvollständiger Typ. Du verletzt damit die Anforderungen des Klassentemplates MapMaps&lt;KEY&gt;.</p>
</blockquote>
<p>Nene, das geht problemlos! (Weil der Typ da überhaupt nicht vollständig sein muss)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2020482</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2020482</guid><dc:creator><![CDATA[mightymighty]]></dc:creator><pubDate>Sun, 13 Feb 2011 13:51:27 GMT</pubDate></item><item><title><![CDATA[Reply to segmentation fault - Brett vor den Augen on Sun, 13 Feb 2011 14:06:03 GMT]]></title><description><![CDATA[<p>mightymighty schrieb:</p>
<blockquote>
<p>krümelkacker schrieb:</p>
<blockquote>
<p>Du versuchst etwas, was nicht erlaubt ist. Zu dem Zeitpunkt, wo Du Map definierst, ist MapMaps&lt;KEY&gt; ein unvollständiger Typ. Du verletzt damit die Anforderungen des Klassentemplates MapMaps&lt;KEY&gt;.</p>
</blockquote>
<p>Nene, das geht problemlos! (Weil der Typ da überhaupt nicht vollständig sein muss)</p>
</blockquote>
<p>Upps, ich meinte natürlich das Klassentemplate std::map. Sonst habe ich dem nichts mehr hinzuzufügen. Tu, was Du nicht lassen kannst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2020487</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2020487</guid><dc:creator><![CDATA[krümelkacker]]></dc:creator><pubDate>Sun, 13 Feb 2011 14:06:03 GMT</pubDate></item></channel></rss>