<?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[zusätzliche Informationen in enum]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe eine ganz einfache Frage:<br />
Kann ich zusätzliche Informationen in jedem enum-Element ablegen?</p>
<p>Ich dachte an etwas analoges zu folgendem Java-Code:</p>
<pre><code class="language-java">public enum PlayerType {
	Red(&quot;red&quot;), Blue(&quot;blue&quot;), Green(&quot;green&quot;), Yellow(&quot;yellow&quot;);
// ...
}
</code></pre>
<p>Wenn nicht, wie verwaltet ihr solche Daten?</p>
<p>Gruß,<br />
Aussie</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/247767/zusätzliche-informationen-in-enum</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 11:55:36 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/247767.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 15 Aug 2009 09:29:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to zusätzliche Informationen in enum on Sat, 15 Aug 2009 09:29:27 GMT]]></title><description><![CDATA[<p>Hallo zusammen,</p>
<p>ich habe eine ganz einfache Frage:<br />
Kann ich zusätzliche Informationen in jedem enum-Element ablegen?</p>
<p>Ich dachte an etwas analoges zu folgendem Java-Code:</p>
<pre><code class="language-java">public enum PlayerType {
	Red(&quot;red&quot;), Blue(&quot;blue&quot;), Green(&quot;green&quot;), Yellow(&quot;yellow&quot;);
// ...
}
</code></pre>
<p>Wenn nicht, wie verwaltet ihr solche Daten?</p>
<p>Gruß,<br />
Aussie</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1761215</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1761215</guid><dc:creator><![CDATA[Aussie]]></dc:creator><pubDate>Sat, 15 Aug 2009 09:29:27 GMT</pubDate></item><item><title><![CDATA[Reply to zusätzliche Informationen in enum on Sat, 15 Aug 2009 09:33:06 GMT]]></title><description><![CDATA[<p>enum ist einfach nicht dazu da, texte zu speichern.<br />
ich verwalte auch keine ausgebbaren enum-texte und sehe keine sinnvolle verwendung dafür.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1761219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1761219</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Sat, 15 Aug 2009 09:33:06 GMT</pubDate></item><item><title><![CDATA[Reply to zusätzliche Informationen in enum on Sat, 15 Aug 2009 09:34:16 GMT]]></title><description><![CDATA[<p>Zum Beispiel:</p>
<pre><code class="language-cpp">enum PlayerType
{
  Red, Blue, Green, Yellow
};

const char* const PlayerTypeInfo[] = 
{
  &quot;Red&quot;, &quot;Blue&quot;, &quot;Green&quot;, &quot;Yellow&quot;
};
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1761222</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1761222</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Sat, 15 Aug 2009 09:34:16 GMT</pubDate></item><item><title><![CDATA[Reply to zusätzliche Informationen in enum on Sat, 15 Aug 2009 09:36:49 GMT]]></title><description><![CDATA[<p>Hi Volkard,</p>
<p>da war mein Beispiel wohl blöd <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Ich habe Typen von Spielfiguren und möchte dazu als Info haben, wieviel<br />
am Anfang auf dem Feld stehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1761226</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1761226</guid><dc:creator><![CDATA[Aussie]]></dc:creator><pubDate>Sat, 15 Aug 2009 09:36:49 GMT</pubDate></item><item><title><![CDATA[Reply to zusätzliche Informationen in enum on Sat, 15 Aug 2009 09:37:53 GMT]]></title><description><![CDATA[<p>Danke David_pb!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1761227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1761227</guid><dc:creator><![CDATA[Aussie]]></dc:creator><pubDate>Sat, 15 Aug 2009 09:37:53 GMT</pubDate></item></channel></rss>