<?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[Hilfe, ich bin ein Idiot]]></title><description><![CDATA[<p>Moin!</p>
<p>Dies ist ein Ausschnitt aus einem Listing:</p>
<pre><code class="language-cpp">void pw (void)		// Menüpunkt '3'
{
	char ant[] = &quot;nichts&quot;;
	char abfr[25];

	while (1)
	{
		if (strncmp(ant,abfr,sizeof(abfr)-1)!=0)
		{
			cout&lt;&lt;&quot;Leider falsch...noch mal&quot;&lt;&lt;endl;
			cin.clear();
			cin.getline(abfr,sizeof(abfr));
		}
		else
		{
			break;
		}

	}
	cout&lt;&lt;endl&lt;&lt;&quot;Richtig!!!&quot;&lt;&lt;endl;
}
</code></pre>
<p>Dass diese Endlosschleife recht unschön ist, weiß ich, die Abbruchbedingung hatte ich auch schon direkt in der Schleife...ändert nix.</p>
<p>Das Problem ist nicht, dass das ding nicht läuft, das Problem ist einfach, dass da jedes mal &quot;Leider falsch...noch mal&quot; steht, noch <strong>bevor</strong> man was eingegeben hat.</p>
<p>Wieso ist das so?!</p>
<p>Wie kann mans wegbekommen?</p>
<p>Ansonsten erfüllt das ding seinen Zweck.</p>
<p>Dnke im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/217687/hilfe-ich-bin-ein-idiot</link><generator>RSS for Node</generator><lastBuildDate>Sat, 10 Oct 2026 08:48:55 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/217687.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 10 Jul 2008 02:53:27 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Hilfe, ich bin ein Idiot on Thu, 10 Jul 2008 02:53:27 GMT]]></title><description><![CDATA[<p>Moin!</p>
<p>Dies ist ein Ausschnitt aus einem Listing:</p>
<pre><code class="language-cpp">void pw (void)		// Menüpunkt '3'
{
	char ant[] = &quot;nichts&quot;;
	char abfr[25];

	while (1)
	{
		if (strncmp(ant,abfr,sizeof(abfr)-1)!=0)
		{
			cout&lt;&lt;&quot;Leider falsch...noch mal&quot;&lt;&lt;endl;
			cin.clear();
			cin.getline(abfr,sizeof(abfr));
		}
		else
		{
			break;
		}

	}
	cout&lt;&lt;endl&lt;&lt;&quot;Richtig!!!&quot;&lt;&lt;endl;
}
</code></pre>
<p>Dass diese Endlosschleife recht unschön ist, weiß ich, die Abbruchbedingung hatte ich auch schon direkt in der Schleife...ändert nix.</p>
<p>Das Problem ist nicht, dass das ding nicht läuft, das Problem ist einfach, dass da jedes mal &quot;Leider falsch...noch mal&quot; steht, noch <strong>bevor</strong> man was eingegeben hat.</p>
<p>Wieso ist das so?!</p>
<p>Wie kann mans wegbekommen?</p>
<p>Ansonsten erfüllt das ding seinen Zweck.</p>
<p>Dnke im Voraus</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544656</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544656</guid><dc:creator><![CDATA[kARRE]]></dc:creator><pubDate>Thu, 10 Jul 2008 02:53:27 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe, ich bin ein Idiot on Thu, 10 Jul 2008 03:14:09 GMT]]></title><description><![CDATA[<blockquote>
<p>Hilfe, ich bin ein Idiot</p>
</blockquote>
<p>Da wird dir dieses Forum aber auch nicht helfen können.<br />
Sowas ist oft angeboren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544657</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544657</guid><dc:creator><![CDATA[antwort schreiber]]></dc:creator><pubDate>Thu, 10 Jul 2008 03:14:09 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe, ich bin ein Idiot on Thu, 10 Jul 2008 04:14:20 GMT]]></title><description><![CDATA[<p>Ist das eine Scherzfrage?</p>
<p>Wenn der in die Schleife geht kommt cout und dann cin. Ist doch logisch das Verhalten.<br />
Mal ordentlich ausschlafen und dann noch mal schauen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1544659</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1544659</guid><dc:creator><![CDATA[ernstmeier]]></dc:creator><pubDate>Thu, 10 Jul 2008 04:14:20 GMT</pubDate></item><item><title><![CDATA[Reply to Hilfe, ich bin ein Idiot on Thu, 10 Jul 2008 17:50:32 GMT]]></title><description><![CDATA[<p>verflucht, du hast recht, mehr kaffee....</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1545250</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1545250</guid><dc:creator><![CDATA[kARRE]]></dc:creator><pubDate>Thu, 10 Jul 2008 17:50:32 GMT</pubDate></item></channel></rss>