<?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[Problem mit stdlib.h]]></title><description><![CDATA[<p>Ich habe folgendes Problem, der Compiler meldet mir immer:<br />
error C2440: 'initializing' : 'void *' kann nicht in 'int *' konvertiert werden</p>
<pre><code class="language-cpp">const Feld = 10;

int* pRest = malloc(Feld * sizeof(int));
</code></pre>
<p>Ich habe alles so wie im Buch beschrieben gemacht, aber es will einfach nicht funktionieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/50802/problem-mit-stdlib-h</link><generator>RSS for Node</generator><lastBuildDate>Sun, 31 May 2026 07:29:51 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/50802.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 03 Oct 2003 13:42:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit stdlib.h on Fri, 03 Oct 2003 13:42:00 GMT]]></title><description><![CDATA[<p>Ich habe folgendes Problem, der Compiler meldet mir immer:<br />
error C2440: 'initializing' : 'void *' kann nicht in 'int *' konvertiert werden</p>
<pre><code class="language-cpp">const Feld = 10;

int* pRest = malloc(Feld * sizeof(int));
</code></pre>
<p>Ich habe alles so wie im Buch beschrieben gemacht, aber es will einfach nicht funktionieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/365454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/365454</guid><dc:creator><![CDATA[FUNPAQ]]></dc:creator><pubDate>Fri, 03 Oct 2003 13:42:00 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit stdlib.h on Fri, 03 Oct 2003 13:58:46 GMT]]></title><description><![CDATA[<p>Tag,</p>
<p>Dann caste die Rückgabe von malloc. Hab zwar mal gehört, dass man das nicht machen soll aber ich machs trotzdem.</p>
<pre><code class="language-cpp">int *val=(int*)malloc(Feld*sizeof(int));
</code></pre>
<p>Du kannst auch dein Feld als void* declarieren und dann bei der Ausgabe oder Benutzung nach int casten.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/365465</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/365465</guid><dc:creator><![CDATA[prolog]]></dc:creator><pubDate>Fri, 03 Oct 2003 13:58:46 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit stdlib.h on Fri, 03 Oct 2003 14:02:27 GMT]]></title><description><![CDATA[<p>Danke, nun müsste es funktionieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/365472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/365472</guid><dc:creator><![CDATA[FUNPAQ]]></dc:creator><pubDate>Fri, 03 Oct 2003 14:02:27 GMT</pubDate></item></channel></rss>