<?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[Unbekanntes Problem im Code?]]></title><description><![CDATA[<p>Hallo liebe c++ community!</p>
<p>Habe eine wahrscheinlich etwas dumme Frage aber habe auch schon etwas länger ausprobiert und nachgeguckt aber warum funktioniert es nicht?</p>
<pre><code>#include &lt;iostream&gt;  
using namespace std;

int main() 
{ 
	char cBuffer[5], bBuffer[5], aBuffer[5]; 

  cout &lt;&lt; &quot;Geben sie die erste Zahl ein: &quot; &lt;&lt; flush; 
  cin.get(aBuffer, 5); 
  cout &lt;&lt; &quot;Erste Zahl: &quot; &lt;&lt; aBuffer &lt;&lt; endl;
  cout &lt;&lt; &quot;Geben sie die zweite Zahl ein: &quot; &lt;&lt; endl;
  cin.get(bBuffer, 5);
  cout &lt;&lt; &quot;Zweite Zahl: &quot; &lt;&lt; bBuffer &lt;&lt; endl;
  cout &lt;&lt; &quot;Geben sie die dritte Zahl ein: &quot; &lt;&lt; endl;
  cin.get(cBuffer, 5);
  cout &lt;&lt; &quot;Dritte Zahl: &quot; &lt;&lt; cBuffer &lt;&lt; endl;

}
</code></pre>
<p>Wenn man es ausführt kann man die erste Zahl eingeben, aber die anderen werden einfach übersprungen?</p>
<p>Hätte da noch eine ziemlich dumme Frage...<br />
Wie kann ich die eingegebenen Zahlen nachher mitteinander verrechen?</p>
<p>Mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/218245/unbekanntes-problem-im-code</link><generator>RSS for Node</generator><lastBuildDate>Fri, 09 Oct 2026 16:26:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/218245.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 17 Jul 2008 20:13:41 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Unbekanntes Problem im Code? on Thu, 17 Jul 2008 20:13:41 GMT]]></title><description><![CDATA[<p>Hallo liebe c++ community!</p>
<p>Habe eine wahrscheinlich etwas dumme Frage aber habe auch schon etwas länger ausprobiert und nachgeguckt aber warum funktioniert es nicht?</p>
<pre><code>#include &lt;iostream&gt;  
using namespace std;

int main() 
{ 
	char cBuffer[5], bBuffer[5], aBuffer[5]; 

  cout &lt;&lt; &quot;Geben sie die erste Zahl ein: &quot; &lt;&lt; flush; 
  cin.get(aBuffer, 5); 
  cout &lt;&lt; &quot;Erste Zahl: &quot; &lt;&lt; aBuffer &lt;&lt; endl;
  cout &lt;&lt; &quot;Geben sie die zweite Zahl ein: &quot; &lt;&lt; endl;
  cin.get(bBuffer, 5);
  cout &lt;&lt; &quot;Zweite Zahl: &quot; &lt;&lt; bBuffer &lt;&lt; endl;
  cout &lt;&lt; &quot;Geben sie die dritte Zahl ein: &quot; &lt;&lt; endl;
  cin.get(cBuffer, 5);
  cout &lt;&lt; &quot;Dritte Zahl: &quot; &lt;&lt; cBuffer &lt;&lt; endl;

}
</code></pre>
<p>Wenn man es ausführt kann man die erste Zahl eingeben, aber die anderen werden einfach übersprungen?</p>
<p>Hätte da noch eine ziemlich dumme Frage...<br />
Wie kann ich die eingegebenen Zahlen nachher mitteinander verrechen?</p>
<p>Mfg</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1549070</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1549070</guid><dc:creator><![CDATA[Frankstyles]]></dc:creator><pubDate>Thu, 17 Jul 2008 20:13:41 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes Problem im Code? on Thu, 17 Jul 2008 20:29:54 GMT]]></title><description><![CDATA[<p>Warum nicht einfach ?! <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>
<pre><code class="language-cpp">int a = 0;
int b = 0;
int c = 0;

cin &gt;&gt; a;
cin &gt;&gt; b;
cin &gt;&gt; c;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1549077</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1549077</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Thu, 17 Jul 2008 20:29:54 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes Problem im Code? on Thu, 17 Jul 2008 22:09:07 GMT]]></title><description><![CDATA[<p>Frankstyles schrieb:</p>
<blockquote>
<p>Wenn man es ausführt kann man die erste Zahl eingeben, aber die anderen werden einfach übersprungen?</p>
</blockquote>
<p>Der Eingabepuffer muss noch geleert werden, in etwa so:</p>
<pre><code class="language-cpp">std::cin.clear();
std::cin.ignore( std::numeric_limits&lt;std::streamsize&gt;::max(), '\n' );
</code></pre>
<p>Und ja, das ist doof, ist aber so <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/1549090</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1549090</guid><dc:creator><![CDATA[Badestrand]]></dc:creator><pubDate>Thu, 17 Jul 2008 22:09:07 GMT</pubDate></item><item><title><![CDATA[Reply to Unbekanntes Problem im Code? on Fri, 18 Jul 2008 12:02:48 GMT]]></title><description><![CDATA[<p>Vielen dank für die Antworten :D!!</p>
<p>Hab das Problem nun so gelöst:</p>
<pre><code class="language-cpp">#include &lt;iostream&gt;  
using namespace std;

int main() 
{ 
	char a = 0;
	char b = 0;
	char c = 0;

  cout &lt;&lt; &quot;Geben sie die erste Zahl ein: &quot; &lt;&lt; flush; 
  cin &gt;&gt; a; 
  cout &lt;&lt; &quot;Erste Zahl: &quot; &lt;&lt; a &lt;&lt; endl;
  cout &lt;&lt; &quot;Geben sie die zweite Zahl ein: &quot; &lt;&lt; flush;
  cin &gt;&gt; b;
  cout &lt;&lt; &quot;Zweite Zahl: &quot; &lt;&lt; b &lt;&lt; endl;
  cout &lt;&lt; &quot;Geben sie die dritte Zahl ein: &quot; &lt;&lt; flush;
  cin &gt;&gt; c;
  cout &lt;&lt; &quot;Dritte Zahl: &quot; &lt;&lt; c &lt;&lt; endl;

}
</code></pre>
<p>Danke nochmal für die schnelle Hilfe! <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/1549345</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1549345</guid><dc:creator><![CDATA[Frankstyles]]></dc:creator><pubDate>Fri, 18 Jul 2008 12:02:48 GMT</pubDate></item></channel></rss>