<?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[Array Anfänger frage]]></title><description><![CDATA[<p>hallo</p>
<pre><code class="language-cpp">int array1[10]={0,1,2,3,4,5,6,7,8,9};
      //array hat 10 elemente

      int array2[3]={0,1};
      //array2[0]==0, array2[1]==1, array2[2]==0
</code></pre>
<p>Das habe ich von einer Seite kopiert, ich habe aber noch eine kleine Frage.</p>
<p>array1 hat 10 elemente, das sind die 10 stück die danach aufgelistet sind</p>
<p>wenn ich beispielsweise auf element 4 von array1 zugreife bekomme ich &quot;3&quot;. Ist das richtig?</p>
<p>Wenn ja, wie funktioniert das bei array 2. Das feld hat 3 elemente aber nur 2 &quot;zuweisungen&quot; ( nennt man das überhaupt so? ).</p>
<p>mfg werner</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/170592/array-anfänger-frage</link><generator>RSS for Node</generator><lastBuildDate>Thu, 17 Sep 2026 03:33:15 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/170592.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 17 Jan 2007 17:05:09 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Array Anfänger frage on Wed, 17 Jan 2007 17:05:09 GMT]]></title><description><![CDATA[<p>hallo</p>
<pre><code class="language-cpp">int array1[10]={0,1,2,3,4,5,6,7,8,9};
      //array hat 10 elemente

      int array2[3]={0,1};
      //array2[0]==0, array2[1]==1, array2[2]==0
</code></pre>
<p>Das habe ich von einer Seite kopiert, ich habe aber noch eine kleine Frage.</p>
<p>array1 hat 10 elemente, das sind die 10 stück die danach aufgelistet sind</p>
<p>wenn ich beispielsweise auf element 4 von array1 zugreife bekomme ich &quot;3&quot;. Ist das richtig?</p>
<p>Wenn ja, wie funktioniert das bei array 2. Das feld hat 3 elemente aber nur 2 &quot;zuweisungen&quot; ( nennt man das überhaupt so? ).</p>
<p>mfg werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211531</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211531</guid><dc:creator><![CDATA[werner66]]></dc:creator><pubDate>Wed, 17 Jan 2007 17:05:09 GMT</pubDate></item><item><title><![CDATA[Reply to Array Anfänger frage on Wed, 17 Jan 2007 17:31:24 GMT]]></title><description><![CDATA[<p>werner66 schrieb:</p>
<blockquote>
<p>wenn ich beispielsweise auf element 4 von array1 zugreife bekomme ich &quot;3&quot;. Ist das richtig?<br />
mfg werner</p>
</blockquote>
<p>Ja! (4. Element: array1[3] liefert 3)</p>
<p>werner66 schrieb:</p>
<blockquote>
<p>Wenn ja, wie funktioniert das bei array 2. Das feld hat 3 elemente aber nur 2 &quot;zuweisungen&quot; ( nennt man das überhaupt so? ).<br />
mfg werner</p>
</blockquote>
<p>Das restliche Feld ist mit 0 aufgefüllt! (3. Element: array2[2] liefert 0)<br />
Wenn du z.B. ein Feld der Grösse 10 anlegest und nur 2 Zuweisungen tätigst, so wird das restliche Feld mit 0 aufgefüllt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211541</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211541</guid><dc:creator><![CDATA[life_drake]]></dc:creator><pubDate>Wed, 17 Jan 2007 17:31:24 GMT</pubDate></item><item><title><![CDATA[Reply to Array Anfänger frage on Wed, 17 Jan 2007 17:37:01 GMT]]></title><description><![CDATA[<p>Achso ist das.</p>
<p>Ok danke dir!</p>
<p>mfg Werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1211543</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1211543</guid><dc:creator><![CDATA[werner66]]></dc:creator><pubDate>Wed, 17 Jan 2007 17:37:01 GMT</pubDate></item></channel></rss>