<?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[Anfängerfrage: calloc in c++ ?]]></title><description><![CDATA[<p>Hallo,<br />
über calloc alloziiere ich ja ein array und habe dann auch lauter Nuller im array - gibt es das für c++ auch irgendwie? Einfach nur mit new gehts ja net...<br />
bin natürlich schon fleißig auf der suche unter goolge etc...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/165133/anfängerfrage-calloc-in-c</link><generator>RSS for Node</generator><lastBuildDate>Mon, 14 Sep 2026 04:10:23 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/165133.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 15 Nov 2006 20:01:22 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Anfängerfrage: calloc in c++ ? on Wed, 15 Nov 2006 20:01:22 GMT]]></title><description><![CDATA[<p>Hallo,<br />
über calloc alloziiere ich ja ein array und habe dann auch lauter Nuller im array - gibt es das für c++ auch irgendwie? Einfach nur mit new gehts ja net...<br />
bin natürlich schon fleißig auf der suche unter goolge etc...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1175483</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1175483</guid><dc:creator><![CDATA[Mati]]></dc:creator><pubDate>Wed, 15 Nov 2006 20:01:22 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage: calloc in c++ ? on Wed, 15 Nov 2006 20:07:54 GMT]]></title><description><![CDATA[<p>new und std::fill schafft abhilfe</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1175489</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1175489</guid><dc:creator><![CDATA[Cpt. Tanga]]></dc:creator><pubDate>Wed, 15 Nov 2006 20:07:54 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage: calloc in c++ ? on Wed, 15 Nov 2006 20:09:48 GMT]]></title><description><![CDATA[<p>danke aber ist das genausoschnell? wie calloc ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1175490</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1175490</guid><dc:creator><![CDATA[Mati]]></dc:creator><pubDate>Wed, 15 Nov 2006 20:09:48 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage: calloc in c++ ? on Wed, 15 Nov 2006 22:38:11 GMT]]></title><description><![CDATA[<p>Mati schrieb:</p>
<blockquote>
<p>danke aber ist das genausoschnell? wie calloc ?</p>
</blockquote>
<p>Nein, wahrscheinlich nicht. &quot;new + std::fill&quot; könnte auf einigen Plattformen u.U. sogar schneller sein (wenn memset/calloc z.B. inline als &quot;REP STOSB&quot; implementiert ist), auf anderen langsamer, wenn memset/calloc hoch optimiert ist (z.B. mittels MMX/SIMD befehlen), und manche Compiler werden sowieso aus der std::fill Schleife nen memset machen (wenn sie gut inlinen und optimieren können).</p>
<p>Allerdings zwischen &quot;calloc&quot; und &quot;new + memset&quot; sollte kaum ein Unterschied sein. &quot;memset&quot; ist zwar auch nicht sehr &quot;C++ig&quot;, aber für doubles OK, und du kannst &quot;new&quot; verwenden. Würde ich der &quot;calloc&quot; Version vorziehen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1175579</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1175579</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Wed, 15 Nov 2006 22:38:11 GMT</pubDate></item><item><title><![CDATA[Reply to Anfängerfrage: calloc in c++ ? on Wed, 15 Nov 2006 23:21:32 GMT]]></title><description><![CDATA[<p>danke - klappt so wunderbar <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="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1175589</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1175589</guid><dc:creator><![CDATA[Mati]]></dc:creator><pubDate>Wed, 15 Nov 2006 23:21:32 GMT</pubDate></item></channel></rss>