<?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[simple io Schleife bricht nach erstem Durchlauf ab]]></title><description><![CDATA[<p>Hallo</p>
<p>ich möchte eine simple io als Schleife ausgeben. Jedoch wird sie nur einmal durchlaufen, unabhängig von der Eingabe. Ich denke das Problem könnte bei der Bedingung liegen. Was meint ihr?</p>
<pre><code class="language-cpp">float milesval;
	char yn = 'y'; //flag

    do {
	cout &lt;&lt; &quot;\n\nPlease enter a distance in miles: &quot;;
	cin &gt;&gt; milesval;
	cout &lt;&lt; &quot;\n&quot; &lt;&lt; milesval &lt;&lt; &quot; are equal to &quot; &lt;&lt; (milesval*1.609) &lt;&lt; &quot;km&quot;;
	cout &lt;&lt; &quot;\n\nDo you want to continue? (y/n) :   &quot;;
	cin &gt;&gt; yn;
	} while ((yn&amp;0x20) == 'y');
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/276298/simple-io-schleife-bricht-nach-erstem-durchlauf-ab</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 11:06:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/276298.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 30 Oct 2010 16:28:03 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to simple io Schleife bricht nach erstem Durchlauf ab on Sat, 30 Oct 2010 16:28:03 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ich möchte eine simple io als Schleife ausgeben. Jedoch wird sie nur einmal durchlaufen, unabhängig von der Eingabe. Ich denke das Problem könnte bei der Bedingung liegen. Was meint ihr?</p>
<pre><code class="language-cpp">float milesval;
	char yn = 'y'; //flag

    do {
	cout &lt;&lt; &quot;\n\nPlease enter a distance in miles: &quot;;
	cin &gt;&gt; milesval;
	cout &lt;&lt; &quot;\n&quot; &lt;&lt; milesval &lt;&lt; &quot; are equal to &quot; &lt;&lt; (milesval*1.609) &lt;&lt; &quot;km&quot;;
	cout &lt;&lt; &quot;\n\nDo you want to continue? (y/n) :   &quot;;
	cin &gt;&gt; yn;
	} while ((yn&amp;0x20) == 'y');
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1972765</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1972765</guid><dc:creator><![CDATA[bamm]]></dc:creator><pubDate>Sat, 30 Oct 2010 16:28:03 GMT</pubDate></item><item><title><![CDATA[Reply to simple io Schleife bricht nach erstem Durchlauf ab on Sat, 30 Oct 2010 17:02:37 GMT]]></title><description><![CDATA[<p>du benuttz da ein bit und ... Das char wird mit 0x00100000 verundet übrig ist also entweder 0x0 oder 0x0010000 .. wenn 'y' nicht auch 0x0010000 ist wird das wohl nie wahr ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1972774</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1972774</guid><dc:creator><![CDATA[padreigh]]></dc:creator><pubDate>Sat, 30 Oct 2010 17:02:37 GMT</pubDate></item><item><title><![CDATA[Reply to simple io Schleife bricht nach erstem Durchlauf ab on Sat, 30 Oct 2010 17:39:06 GMT]]></title><description><![CDATA[<p>padreigh schrieb:</p>
<blockquote>
<p>du benuttz da ein bit</p>
</blockquote>
<p>dachte char ist ein byte groß</p>
<blockquote>
<p>Das char wird mit 0x00100000 verundet</p>
</blockquote>
<p>nein, aber mit 00100000_2</p>
<p>in C ging das doch auch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1972789</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1972789</guid><dc:creator><![CDATA[bamm]]></dc:creator><pubDate>Sat, 30 Oct 2010 17:39:06 GMT</pubDate></item><item><title><![CDATA[Reply to simple io Schleife bricht nach erstem Durchlauf ab on Sat, 30 Oct 2010 18:09:52 GMT]]></title><description><![CDATA[<p>Sorry für die falschen x's bei den Binärdingern ... dachte es reicht dich in die Richtung zu stuppsen, nun also nochmal Langtext:</p>
<p>char == 00000000(Basis 2) bis 11111111(Basis2)<br />
0x20 == 00100000(Basis 2)</p>
<pre><code class="language-cpp">00000000           11110111           10101011
&amp; 00100000         &amp; 00100000         &amp; 00100000
----------         ----------         ----------
  00000000           00100000           00100000
</code></pre>
<p>Wenn nun nicht 'y' == 00100000(Basis2) dann ist der Ausdruck immer false ... mach einfach <code>yn == 'y'</code> und feddich ...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1972804</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1972804</guid><dc:creator><![CDATA[padreigh]]></dc:creator><pubDate>Sat, 30 Oct 2010 18:09:52 GMT</pubDate></item><item><title><![CDATA[Reply to simple io Schleife bricht nach erstem Durchlauf ab on Sat, 30 Oct 2010 18:32:39 GMT]]></title><description><![CDATA[<p>ups, hatte es falsch in errinerung. | statt &amp; wird's tun.</p>
<p>Danke für deinen Stupser <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="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1972819</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1972819</guid><dc:creator><![CDATA[bamm]]></dc:creator><pubDate>Sat, 30 Oct 2010 18:32:39 GMT</pubDate></item><item><title><![CDATA[Reply to simple io Schleife bricht nach erstem Durchlauf ab on Sat, 30 Oct 2010 20:42:21 GMT]]></title><description><![CDATA[<p>Benutze lieber tolower anstatt Bitoperationen, um in Kleinbuchstaben zu verwandeln:</p>
<pre><code class="language-cpp">tolower(yn) == 'y';
</code></pre>
<p>Evtl. noch &lt;cctype&gt; includen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1972866</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1972866</guid><dc:creator><![CDATA[Th69]]></dc:creator><pubDate>Sat, 30 Oct 2010 20:42:21 GMT</pubDate></item></channel></rss>