<?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[Kein Ende bei Schleifen mit Array-Bedingung]]></title><description><![CDATA[<p>Sorry - hab´s gerade gemerkt, bin hier falsch bei der Topic ---&gt; hab das ganze gerade bei c++ gepostet. Hoffe der Admin nimmts dem Newby nich übel. SORRY</p>
<p>Blöder Titel aber wahr, habe ein Problem das ich aus einer Schleife einfach nicht rauskomme und nicht weiß warum. Hab es schon mit ner for-Schleife und einer do-while Schleife Probiert.<br />
Hier der Quelltext, vielleicht liegt es ja an der Abbruchfunktion die auf ein Array-platz verweißt. Habe das noch nie probiert und weiß daher nicht woran es liegen könnte. Für eure Hilfe schonmal vielen Dank.</p>
<p>Versuch 1: for-Schleife</p>
<p>for (int i=0; Wahl [i] != 6 ; i++)<br />
// auch die Variante mit &quot;for (int i=1; Wahl [i-1] != 6 ; i++)&quot;<br />
// hat nicht funktioniert<br />
{<br />
cout&lt;&lt; &quot;Drücken sie &lt;1&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;2&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;3&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;4&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;5&gt; zum &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;6&gt; zum Starten &quot; &lt;&lt;endl;</p>
<p>cin&gt;&gt; Wahl [i];</p>
<p>}</p>
<p>Versuch 2: do-while-Schleife</p>
<p>int i=0;<br />
do<br />
{</p>
<p>i=i+1; //i startet mit dem Wert 0+1=1 !!!<br />
cout&lt;&lt; &quot;Drücken sie &lt;1&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;2&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;3&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;4&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;5&gt; zum &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;6&gt; zum Starten &quot; &lt;&lt;endl;</p>
<p>cin&gt;&gt; Wahl [i];</p>
<p>} while (Wahl [i] != 6);</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/152639/kein-ende-bei-schleifen-mit-array-bedingung</link><generator>RSS for Node</generator><lastBuildDate>Sun, 09 Aug 2026 03:28:22 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/152639.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 08 Jul 2006 07:23:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Kein Ende bei Schleifen mit Array-Bedingung on Sat, 08 Jul 2006 07:34:18 GMT]]></title><description><![CDATA[<p>Sorry - hab´s gerade gemerkt, bin hier falsch bei der Topic ---&gt; hab das ganze gerade bei c++ gepostet. Hoffe der Admin nimmts dem Newby nich übel. SORRY</p>
<p>Blöder Titel aber wahr, habe ein Problem das ich aus einer Schleife einfach nicht rauskomme und nicht weiß warum. Hab es schon mit ner for-Schleife und einer do-while Schleife Probiert.<br />
Hier der Quelltext, vielleicht liegt es ja an der Abbruchfunktion die auf ein Array-platz verweißt. Habe das noch nie probiert und weiß daher nicht woran es liegen könnte. Für eure Hilfe schonmal vielen Dank.</p>
<p>Versuch 1: for-Schleife</p>
<p>for (int i=0; Wahl [i] != 6 ; i++)<br />
// auch die Variante mit &quot;for (int i=1; Wahl [i-1] != 6 ; i++)&quot;<br />
// hat nicht funktioniert<br />
{<br />
cout&lt;&lt; &quot;Drücken sie &lt;1&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;2&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;3&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;4&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;5&gt; zum &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;6&gt; zum Starten &quot; &lt;&lt;endl;</p>
<p>cin&gt;&gt; Wahl [i];</p>
<p>}</p>
<p>Versuch 2: do-while-Schleife</p>
<p>int i=0;<br />
do<br />
{</p>
<p>i=i+1; //i startet mit dem Wert 0+1=1 !!!<br />
cout&lt;&lt; &quot;Drücken sie &lt;1&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;2&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;3&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;4&gt; für &quot; &lt;&lt;endl;<br />
cout&lt;&lt; &quot; &lt;5&gt; zum &quot; &lt;&lt;endl;<br />
cout&lt;&lt; endl;<br />
cout&lt;&lt; &quot; &lt;6&gt; zum Starten &quot; &lt;&lt;endl;</p>
<p>cin&gt;&gt; Wahl [i];</p>
<p>} while (Wahl [i] != 6);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1093689</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1093689</guid><dc:creator><![CDATA[Hunter S Thompson]]></dc:creator><pubDate>Sat, 08 Jul 2006 07:34:18 GMT</pubDate></item><item><title><![CDATA[Reply to Kein Ende bei Schleifen mit Array-Bedingung on Sat, 08 Jul 2006 07:33:13 GMT]]></title><description><![CDATA[<p>Wo wird Wahl definiert / deklariert?</p>
<p>Hoffe du hast das Array entsprechend groß gemacht. Wenn jemand 2000 Mal nicht die 6 eingibt, braucht das eine gewisse Größe</p>
<p>Letzter Code läuft zwar ist aber extrem grauselig.</p>
<p>Sorry, aber irgendwie solltest du dir mal aus eine Buch oder über google ein Beispiel für eine Eingabesteuerung ansehen.</p>
<p>Leider hat das ganze nix mit dem C++Builder Framework zu tun</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1093691</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1093691</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sat, 08 Jul 2006 07:33:13 GMT</pubDate></item><item><title><![CDATA[Reply to Kein Ende bei Schleifen mit Array-Bedingung on Sat, 08 Jul 2006 07:39:35 GMT]]></title><description><![CDATA[<p>Christian211 schrieb:</p>
<blockquote>
<p>Wo wird Wahl definiert / deklariert?</p>
<p>Hoffe du hast das Array entsprechend groß gemacht. Wenn jemand 2000 Mal nicht die 6 eingibt, braucht das eine gewisse Größe</p>
<p>Letzter Code läuft zwar ist aber extrem grauselig.</p>
<p>Sorry, aber irgendwie solltest du dir mal aus eine Buch oder über google ein Beispiel für eine Eingabesteuerung ansehen.</p>
<p>Leider hat das ganze nix mit dem C++Builder Framework zu tun</p>
</blockquote>
<p>Wahl hab ich wie folgt deklariert: char Wahl [4000];<br />
Weiß auch nicht wie groß ein Array max werden darf?<br />
mit 4000byte läuft es noch Fehlerfrei soweit wie ich es getestet hab.. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
<p>Letzter Code läuft zwar.... --&gt;eben leider nicht. Erster wäre mir aber auch lieber. Kann der Fehler an der Array funktion liegen???</p>
<p>Und Sorry das ich hier in der falschen Topic bin. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1093694</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1093694</guid><dc:creator><![CDATA[Hunter S Thompson]]></dc:creator><pubDate>Sat, 08 Jul 2006 07:39:35 GMT</pubDate></item><item><title><![CDATA[Reply to Kein Ende bei Schleifen mit Array-Bedingung on Sat, 08 Jul 2006 07:48:42 GMT]]></title><description><![CDATA[<p>hier weiter:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-p-is-1093698.html#1093698" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-p-is-1093698.html#1093698</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1093700</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1093700</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Sat, 08 Jul 2006 07:48:42 GMT</pubDate></item><item><title><![CDATA[Reply to Kein Ende bei Schleifen mit Array-Bedingung on Sat, 08 Jul 2006 07:53:03 GMT]]></title><description><![CDATA[<p>Meiner Meinung nach, wird in dem ersten Beispiel am ende der for-Schleife das i jedes Mal um 1 erhöht und dann die Bedinung abgeprüft. Es sollte also maximal die Bedinung die Du als Kommentar geschrieben hast funktionieren.</p>
<p>Aber warum willst Du dir eigentlich die ganzen Auswahlen immer wieder im Array abspeichern?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1093704</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1093704</guid><dc:creator><![CDATA[Phips!]]></dc:creator><pubDate>Sat, 08 Jul 2006 07:53:03 GMT</pubDate></item><item><title><![CDATA[Reply to Kein Ende bei Schleifen mit Array-Bedingung on Sat, 08 Jul 2006 07:55:29 GMT]]></title><description><![CDATA[<p>hier weiter:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic-var-p-is-1093698.html#1093698" rel="nofollow">http://www.c-plusplus.net/forum/viewtopic-var-p-is-1093698.html#1093698</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1093705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1093705</guid><dc:creator><![CDATA[elise]]></dc:creator><pubDate>Sat, 08 Jul 2006 07:55:29 GMT</pubDate></item><item><title><![CDATA[Reply to Kein Ende bei Schleifen mit Array-Bedingung on Sat, 08 Jul 2006 12:59:07 GMT]]></title><description><![CDATA[<blockquote>
<p>char Wahl [4000];</p>
</blockquote>
<p>Welches Zeichen entspricht einem char 6 wohl??</p>
<p>Welches Code hat die Ziffer 6 dann?</p>
<p>Ich bin schon davon ausgegangen es handelt sich um ein int Array</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1093881</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1093881</guid><dc:creator><![CDATA[Christian211]]></dc:creator><pubDate>Sat, 08 Jul 2006 12:59:07 GMT</pubDate></item></channel></rss>