<?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[Hat schon jemand den selben Fehler gahabt??]]></title><description><![CDATA[<pre><code class="language-cpp">void functionname(HMENU handle, int id)
{
int i1, i2;

switch((long)handle)
{
case ((long)hSounds):
	i1 = 0; //hier ist zeile 2238
	i2 = 14;
	break;	

case ((long)hColors):
	i1 = 16;
	i2 = 17;
}
}
</code></pre>
<p>Generierte felermeldung:<br />
Error E2313 C:\projekt.cpp 2238: Constant expression required in function functionname(HMENU__ *,int)</p>
<p>Wäre nett wenn jmd. sagen könnte wo der Fehler liegt. Ich sehe keinen..<br />
Mfg.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/77350/hat-schon-jemand-den-selben-fehler-gahabt</link><generator>RSS for Node</generator><lastBuildDate>Sat, 11 Apr 2026 17:39:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/77350.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 20 Jun 2004 12:25:28 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hat schon jemand den selben Fehler gahabt?? on Sun, 20 Jun 2004 12:25:28 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">void functionname(HMENU handle, int id)
{
int i1, i2;

switch((long)handle)
{
case ((long)hSounds):
	i1 = 0; //hier ist zeile 2238
	i2 = 14;
	break;	

case ((long)hColors):
	i1 = 16;
	i2 = 17;
}
}
</code></pre>
<p>Generierte felermeldung:<br />
Error E2313 C:\projekt.cpp 2238: Constant expression required in function functionname(HMENU__ *,int)</p>
<p>Wäre nett wenn jmd. sagen könnte wo der Fehler liegt. Ich sehe keinen..<br />
Mfg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/544209</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/544209</guid><dc:creator><![CDATA[Tolga]]></dc:creator><pubDate>Sun, 20 Jun 2004 12:25:28 GMT</pubDate></item><item><title><![CDATA[Reply to Hat schon jemand den selben Fehler gahabt?? on Sun, 20 Jun 2004 12:31:00 GMT]]></title><description><![CDATA[<p>Ganz einfach: Das Schlüsselwort 'case' erlaubt nur Konstanten. 'hSounds' und 'hColors' sind in deinem Fall jedoch Variablen, deshalb lässt es sich nicht kompilieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/544216</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/544216</guid><dc:creator><![CDATA[Aziz]]></dc:creator><pubDate>Sun, 20 Jun 2004 12:31:00 GMT</pubDate></item><item><title><![CDATA[Reply to Hat schon jemand den selben Fehler gahabt?? on Sun, 20 Jun 2004 12:48:04 GMT]]></title><description><![CDATA[<p>Danke Aziz!</p>
<p>Habe den switch durch 2 ifs ersetzt nun klappts...</p>
<pre><code class="language-cpp">if (handle==hColors)
	{
	i1 = 0;
	i2 = 14;
	}
if (handle==hSounds)
	{
	i1 = 16;
	i2 = 17;
	}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/544226</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/544226</guid><dc:creator><![CDATA[Tolga]]></dc:creator><pubDate>Sun, 20 Jun 2004 12:48:04 GMT</pubDate></item></channel></rss>