<?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[Dynamisches Array erzeugen]]></title><description><![CDATA[<p>Hi Leute,<br />
würde gerne daß Array &quot;Werte&quot; dynamisch erzeugen lassen. Und zwar mit der Anzahl die ich der Variable &quot;zahlenanzahl&quot; aus meinem Edit zuweise. Habe daß mal wie es unten steht probiert, klappt so aber leider nicht. Würde gerne eure Hilfe bekommen.</p>
<p>Danke</p>
<p>yellow1</p>
<p>double zahlenanzahl = StrToFloat(Form1-&gt;edZahlenanzahl-&gt;Text);<br />
werte = new double[zahlenanzahl];<br />
werte[zahlenanzahl];</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/130416/dynamisches-array-erzeugen</link><generator>RSS for Node</generator><lastBuildDate>Wed, 26 Aug 2026 14:51:40 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/130416.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 22 Dec 2005 18:50:06 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dynamisches Array erzeugen on Thu, 22 Dec 2005 18:50:06 GMT]]></title><description><![CDATA[<p>Hi Leute,<br />
würde gerne daß Array &quot;Werte&quot; dynamisch erzeugen lassen. Und zwar mit der Anzahl die ich der Variable &quot;zahlenanzahl&quot; aus meinem Edit zuweise. Habe daß mal wie es unten steht probiert, klappt so aber leider nicht. Würde gerne eure Hilfe bekommen.</p>
<p>Danke</p>
<p>yellow1</p>
<p>double zahlenanzahl = StrToFloat(Form1-&gt;edZahlenanzahl-&gt;Text);<br />
werte = new double[zahlenanzahl];<br />
werte[zahlenanzahl];</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948051</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948051</guid><dc:creator><![CDATA[yellow1]]></dc:creator><pubDate>Thu, 22 Dec 2005 18:50:06 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Array erzeugen on Thu, 22 Dec 2005 19:23:49 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>da wir hier im C Forum sind, wirst du wohl eher malloc brauchen:</p>
<pre><code class="language-cpp">size_t anzahl=0;
scanf(&quot;%d&quot;, &amp;anzahl);

double *array = (double*)malloc(sizeof(double) * anzahl));
//mit array arbeiten
free(array);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/948083</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948083</guid><dc:creator><![CDATA[GPC]]></dc:creator><pubDate>Thu, 22 Dec 2005 19:23:49 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Array erzeugen on Fri, 23 Dec 2005 10:51:19 GMT]]></title><description><![CDATA[<p>in c++ geht das so:</p>
<pre><code class="language-cpp">int zahlnenzahl=StrToInt(Form1-&gt;edZahlenanzahl-&gt;Text);
double *werte = new[zahlenanzahl] double;
</code></pre>
<p>der arrayindex muß eine ganzzahl sein.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948428</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948428</guid><dc:creator><![CDATA[Konfusius]]></dc:creator><pubDate>Fri, 23 Dec 2005 10:51:19 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Array erzeugen on Fri, 23 Dec 2005 12:07:58 GMT]]></title><description><![CDATA[<p>Konfusius schrieb:</p>
<blockquote>
<p>in c++ geht das so:</p>
<pre><code class="language-cpp">int zahlnenzahl=StrToInt(Form1-&gt;edZahlenanzahl-&gt;Text);
double *werte = new[zahlenanzahl] double;
</code></pre>
<p>der arrayindex muß eine ganzzahl sein.</p>
</blockquote>
<ol>
<li>falsches forum</li>
<li>falscher code</li>
</ol>
<pre><code class="language-cpp">double *werte = new double[zahlenanzahl];
</code></pre>
<p>wäre richtig</p>
]]></description><link>https://www.c-plusplus.net/forum/post/948498</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948498</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Fri, 23 Dec 2005 12:07:58 GMT</pubDate></item><item><title><![CDATA[Reply to Dynamisches Array erzeugen on Sat, 24 Dec 2005 02:01:32 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=13512" rel="nofollow">c.rackwitz</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=10" rel="nofollow">ANSI C</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/948988</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/948988</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Sat, 24 Dec 2005 02:01:32 GMT</pubDate></item></channel></rss>