<?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[cin - char[] int[]]]></title><description><![CDATA[<p>Hallo</p>
<p>Wiso ist das so?</p>
<pre><code class="language-cpp">char c[5];
cin &gt;&gt; c; // Das hier geht

int i[5];
cin &gt;&gt; i; // Das hier geht nicht
</code></pre>
<p>Kann man es dadurch erklären, dass der Compiler dies bei Character arrays einfach zulässt?</p>
<p>Bin für jede Antwort dankar!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/296713/cin-char-int</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 19:28:45 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/296713.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Dec 2011 18:16:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to cin - char[] int[] on Sat, 10 Dec 2011 18:16:57 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>Wiso ist das so?</p>
<pre><code class="language-cpp">char c[5];
cin &gt;&gt; c; // Das hier geht

int i[5];
cin &gt;&gt; i; // Das hier geht nicht
</code></pre>
<p>Kann man es dadurch erklären, dass der Compiler dies bei Character arrays einfach zulässt?</p>
<p>Bin für jede Antwort dankar!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2155452</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2155452</guid><dc:creator><![CDATA[LEARNcpp]]></dc:creator><pubDate>Sat, 10 Dec 2011 18:16:57 GMT</pubDate></item><item><title><![CDATA[Reply to cin - char[] int[] on Sat, 10 Dec 2011 18:28:17 GMT]]></title><description><![CDATA[<p>Schau dir mal die Überladungen für den istream &gt;&gt; Operator an:<br />
<a href="http://www.cplusplus.com/reference/iostream/istream/operator%3E%3E/" rel="nofollow">http://www.cplusplus.com/reference/iostream/istream/operator&gt;&gt;/</a></p>
<pre><code class="language-cpp">istream&amp; operator&gt;&gt; (istream&amp; is, char* str );
</code></pre>
<p>Deswegen kannst du ein char-Array übergeben. Bei einem einem string wie &quot;hallo&quot; sind alle Buchstaben einzelne Chars. Ein integer Wert kann aber mehrstellig sein, aber trotzdem brauch man kein Array. Wie erwartest du denn, wie die Eingabe für ein integer-Array sein sollte? Man müsste ja mehrere Werte bei der Eingabe angeben. Daher macht das keinen Sinn.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2155456</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2155456</guid><dc:creator><![CDATA[freaky]]></dc:creator><pubDate>Sat, 10 Dec 2011 18:28:17 GMT</pubDate></item><item><title><![CDATA[Reply to cin - char[] int[] on Sat, 10 Dec 2011 18:42:57 GMT]]></title><description><![CDATA[<p>Mir ist schon klar das es keinen Sinn machen würde wie beim char-Array, aber wunderte mich wiso es da funktioniert und bei einem integer-Array bsp. nicht.</p>
<p>Bin jezt dem Link gefolgt und sehe da die Methoden, so macht das ganze jezt Sinn <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="🙂"
    /> Bin eben noch bei den Grundlagen...</p>
<p>Vielen Dank FreakY&lt;3Cpp</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2155460</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2155460</guid><dc:creator><![CDATA[LEARNcpp]]></dc:creator><pubDate>Sat, 10 Dec 2011 18:42:57 GMT</pubDate></item></channel></rss>