<?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[Neuling braucht hilfe]]></title><description><![CDATA[<p>Hallo liebes Forum,</p>
<p>ich bin relativ neu beim Programmieren, daher bitte ich um Verständnis, falls der Groschen nicht auf anhieb fällt.<br />
Ich habe mir ein Buch zur C-Programmierung gekauft und bin fleißig am lesen und nachmachen, jedoch kommt bei einer Aufgabe folgender Fehler (ich programmiere über Eclipse für Mac):</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;ctype.h&gt;

main() {

	char eingabe;
	int zahl;
	printf(&quot;\nWählen Sie (O)ktal, (H)ex oder (A)SCII &gt; &quot;);
	eingabe=getchar();
	printf(&quot;\nBitte Dezimalzahl eingebn : &quot;);
	scanf(&quot;%i&quot;,&amp;zahl);
	switch(toupper(eingabe)); {
		case 'O':
			printf(&quot;Dezimal %i = Oktal %o \n&quot;,zahl,zahl);
			break;
		case 'H':
			printf(&quot;Dezimal %i = Hexadezimal %x \n&quot;,zahl,zahl);
			break;
		case 'A':
		if (zahl &lt;= 255)
			printf(&quot;ACSII-Code %i entspricht %c \n&quot;,zahl,zahl);
		else
			printf(&quot;\nDiese Zahl ist zu groß! \n\a&quot;);
		break;
	}
}
</code></pre>
<p>So Eclipse gibt mir jetzt folgenden Fehler aus:</p>
<p>../src/test.c:15: error: case label not within a switch statement<br />
../src/test.c:17: error: break statement not within loop or switch<br />
../src/test.c:18: error: case label not within a switch statement<br />
../src/test.c:20: error: break statement not within loop or switch<br />
../src/test.c:21: error: case label not within a switch statement<br />
../src/test.c:26: error: break statement not within loop or switch</p>
<p>Ich bin hier schon am Ausrasten, also wäre nett wenn jemand helfen könnte.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/274215/neuling-braucht-hilfe</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 18:48:49 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/274215.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 21 Sep 2010 18:19:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Neuling braucht hilfe on Tue, 21 Sep 2010 18:19:12 GMT]]></title><description><![CDATA[<p>Hallo liebes Forum,</p>
<p>ich bin relativ neu beim Programmieren, daher bitte ich um Verständnis, falls der Groschen nicht auf anhieb fällt.<br />
Ich habe mir ein Buch zur C-Programmierung gekauft und bin fleißig am lesen und nachmachen, jedoch kommt bei einer Aufgabe folgender Fehler (ich programmiere über Eclipse für Mac):</p>
<pre><code>#include &lt;stdio.h&gt;
#include &lt;ctype.h&gt;

main() {

	char eingabe;
	int zahl;
	printf(&quot;\nWählen Sie (O)ktal, (H)ex oder (A)SCII &gt; &quot;);
	eingabe=getchar();
	printf(&quot;\nBitte Dezimalzahl eingebn : &quot;);
	scanf(&quot;%i&quot;,&amp;zahl);
	switch(toupper(eingabe)); {
		case 'O':
			printf(&quot;Dezimal %i = Oktal %o \n&quot;,zahl,zahl);
			break;
		case 'H':
			printf(&quot;Dezimal %i = Hexadezimal %x \n&quot;,zahl,zahl);
			break;
		case 'A':
		if (zahl &lt;= 255)
			printf(&quot;ACSII-Code %i entspricht %c \n&quot;,zahl,zahl);
		else
			printf(&quot;\nDiese Zahl ist zu groß! \n\a&quot;);
		break;
	}
}
</code></pre>
<p>So Eclipse gibt mir jetzt folgenden Fehler aus:</p>
<p>../src/test.c:15: error: case label not within a switch statement<br />
../src/test.c:17: error: break statement not within loop or switch<br />
../src/test.c:18: error: case label not within a switch statement<br />
../src/test.c:20: error: break statement not within loop or switch<br />
../src/test.c:21: error: case label not within a switch statement<br />
../src/test.c:26: error: break statement not within loop or switch</p>
<p>Ich bin hier schon am Ausrasten, also wäre nett wenn jemand helfen könnte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1955557</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1955557</guid><dc:creator><![CDATA[David66]]></dc:creator><pubDate>Tue, 21 Sep 2010 18:19:12 GMT</pubDate></item><item><title><![CDATA[Reply to Neuling braucht hilfe on Tue, 21 Sep 2010 18:21:36 GMT]]></title><description><![CDATA[<p>Das Semikolon ist fehl am Platz:</p>
<pre><code class="language-cpp">switch(toupper(eingabe));
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1955559</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1955559</guid><dc:creator><![CDATA[David_pb]]></dc:creator><pubDate>Tue, 21 Sep 2010 18:21:36 GMT</pubDate></item><item><title><![CDATA[Reply to Neuling braucht hilfe on Tue, 21 Sep 2010 18:22:26 GMT]]></title><description><![CDATA[<p>Zeile 12 Semikolon weg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1955561</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1955561</guid><dc:creator><![CDATA[Zeus]]></dc:creator><pubDate>Tue, 21 Sep 2010 18:22:26 GMT</pubDate></item><item><title><![CDATA[Reply to Neuling braucht hilfe on Tue, 21 Sep 2010 18:25:50 GMT]]></title><description><![CDATA[<p>Danke, für die sehr schnelle Hilfe.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1955565</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1955565</guid><dc:creator><![CDATA[David66]]></dc:creator><pubDate>Tue, 21 Sep 2010 18:25:50 GMT</pubDate></item></channel></rss>