<?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[x Anzahl Klassen Insanzen erstellen]]></title><description><![CDATA[<p>Hi,<br />
wie der Titel schon sagt würd ich gerne wissen ob man eine art loop machen kann um eine bestimmte anzahl von Instanzen zu erstellen.</p>
<p>Also anstatt dass man:</p>
<p>klasse instanz1;<br />
klasse instanz2;<br />
klasse instanz13;<br />
...</p>
<p>das einfacher gestaltet.<br />
Gibts sowas in der richtung und wenn ja wie würde das dann mit Pointern aus sehen also wieder anstatt:</p>
<p>klasse *instanz1 = new klasse;<br />
klasse *instanz2 = new klasse;<br />
klasse *instanz3 = new klasse;<br />
..</p>
<p>Hoffe mir kann jemand helfen :p</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/310406/x-anzahl-klassen-insanzen-erstellen</link><generator>RSS for Node</generator><lastBuildDate>Tue, 04 Aug 2026 17:34:38 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/310406.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 10 Nov 2012 22:11:04 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to x Anzahl Klassen Insanzen erstellen on Sat, 10 Nov 2012 22:11:04 GMT]]></title><description><![CDATA[<p>Hi,<br />
wie der Titel schon sagt würd ich gerne wissen ob man eine art loop machen kann um eine bestimmte anzahl von Instanzen zu erstellen.</p>
<p>Also anstatt dass man:</p>
<p>klasse instanz1;<br />
klasse instanz2;<br />
klasse instanz13;<br />
...</p>
<p>das einfacher gestaltet.<br />
Gibts sowas in der richtung und wenn ja wie würde das dann mit Pointern aus sehen also wieder anstatt:</p>
<p>klasse *instanz1 = new klasse;<br />
klasse *instanz2 = new klasse;<br />
klasse *instanz3 = new klasse;<br />
..</p>
<p>Hoffe mir kann jemand helfen :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2269693</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2269693</guid><dc:creator><![CDATA[Saruman]]></dc:creator><pubDate>Sat, 10 Nov 2012 22:11:04 GMT</pubDate></item><item><title><![CDATA[Reply to x Anzahl Klassen Insanzen erstellen on Sat, 10 Nov 2012 22:12:29 GMT]]></title><description><![CDATA[<p>Was hältst du davon:</p>
<pre><code class="language-cpp">klasse instanz[13];
</code></pre>
<p>Mit instanz[0] kannst du auf die erste zugreifen, mit instanz[12] auf die dreizehnte.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2269694</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2269694</guid><dc:creator><![CDATA[mr array]]></dc:creator><pubDate>Sat, 10 Nov 2012 22:12:29 GMT</pubDate></item><item><title><![CDATA[Reply to x Anzahl Klassen Insanzen erstellen on Sat, 10 Nov 2012 22:13:02 GMT]]></title><description><![CDATA[<p>Schau dir mal std::vector an. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2269695</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2269695</guid><dc:creator><![CDATA[dot]]></dc:creator><pubDate>Sat, 10 Nov 2012 22:13:02 GMT</pubDate></item><item><title><![CDATA[Reply to x Anzahl Klassen Insanzen erstellen on Sat, 10 Nov 2012 22:43:30 GMT]]></title><description><![CDATA[<p>cool danke!<br />
hatte nicht gewusst das man auch klassen instanzen so als array behandeln kann :p<br />
aber ich glaub das mit std::vector ist noch ein bisschen zu &quot;hoch&quot; für mich aber trotzdem danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2269706</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2269706</guid><dc:creator><![CDATA[Saruman]]></dc:creator><pubDate>Sat, 10 Nov 2012 22:43:30 GMT</pubDate></item><item><title><![CDATA[Reply to x Anzahl Klassen Insanzen erstellen on Sat, 10 Nov 2012 23:11:16 GMT]]></title><description><![CDATA[<p>Saruman schrieb:</p>
<blockquote>
<p>cool danke!<br />
hatte nicht gewusst das man auch klassen instanzen so als array behandeln kann :p<br />
aber ich glaub das mit std::vector ist noch ein bisschen zu &quot;hoch&quot; für mich aber trotzdem danke <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
</blockquote>
<p>eigentlich ist es genau anders rum. Das ganze new rumgefriemel wirst du eh nicht richtig hin kriegen - es geht bereits theoretisch nicht, also gib einfach auf und nutz std::vector :).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2269716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2269716</guid><dc:creator><![CDATA[otze]]></dc:creator><pubDate>Sat, 10 Nov 2012 23:11:16 GMT</pubDate></item></channel></rss>