<?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[Per Schleife neue Variablennamen erstellen]]></title><description><![CDATA[<p>Meine Frage ist:</p>
<p>Kann ich mit einer Schleife neue Variablennamen erstellen?<br />
Also das &quot;i&quot; immer an den Namen hinten ran kommt (Name einer struktur) z.B.</p>
<pre><code>struct Anschrift{
        string Name;
        int Alter;
};

for(int i=0;i&lt;11;i++){
        Anschrift &quot;name&quot;i;
}
</code></pre>
<p>Ist soetwas möglich?<br />
Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/322628/per-schleife-neue-variablennamen-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 23:56:16 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/322628.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 01 Jan 2014 11:47:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Per Schleife neue Variablennamen erstellen on Wed, 01 Jan 2014 11:50:35 GMT]]></title><description><![CDATA[<p>Meine Frage ist:</p>
<p>Kann ich mit einer Schleife neue Variablennamen erstellen?<br />
Also das &quot;i&quot; immer an den Namen hinten ran kommt (Name einer struktur) z.B.</p>
<pre><code>struct Anschrift{
        string Name;
        int Alter;
};

for(int i=0;i&lt;11;i++){
        Anschrift &quot;name&quot;i;
}
</code></pre>
<p>Ist soetwas möglich?<br />
Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2374401</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2374401</guid><dc:creator><![CDATA[Skeptar]]></dc:creator><pubDate>Wed, 01 Jan 2014 11:50:35 GMT</pubDate></item><item><title><![CDATA[Reply to Per Schleife neue Variablennamen erstellen on Wed, 01 Jan 2014 11:52:42 GMT]]></title><description><![CDATA[<p>Skeptar schrieb:</p>
<blockquote>
<p>Meine Frage ist:</p>
<p>Kann ich mit einer Schleife neue Variablennamen erstellen?<br />
Also das &quot;i&quot; immer an den Namen hinten ran kommt (Name einer struktur) z.B.</p>
<pre><code>for(int i=0;i&lt;11;i++){
        Anschrift &quot;name&quot;i;
}
</code></pre>
<p>Ist soetwas möglich?<br />
Gruß</p>
</blockquote>
<p>Ja, das nennt sich Array. Oder auch std::vector, das wäre zu bevorzugen, wirst aber unter Array bessere Texte finden. std::vector::push_back passt hingegen besser zu Deiner Schleife.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2374402</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2374402</guid><dc:creator><![CDATA[volkard]]></dc:creator><pubDate>Wed, 01 Jan 2014 11:52:42 GMT</pubDate></item><item><title><![CDATA[Reply to Per Schleife neue Variablennamen erstellen on Wed, 01 Jan 2014 11:52:51 GMT]]></title><description><![CDATA[<p>volkard schrieb:</p>
<blockquote>
<p>Ja, das nennt sich Array (, oder auch std::vector, das wäre zu bevorzugen, wirst aber unter Array bessere Texte finden).</p>
</blockquote>
<p>Ach ja genau daran habe ich gar nicht gedacht.. <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="🙂"
    /><br />
Danke dir!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2374403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2374403</guid><dc:creator><![CDATA[Skeptar]]></dc:creator><pubDate>Wed, 01 Jan 2014 11:52:51 GMT</pubDate></item></channel></rss>