<?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[NULL Makro (__cplusplus]]></title><description><![CDATA[<pre><code class="language-cpp">/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL    0
#else
#define NULL    ((void *)0)
#endif
#endif
</code></pre>
<p>Wann ist __cplusplus denn eigentlich definiert?<br />
Also wann genau wird NULL durch ((void *)0) ersetzt?<br />
Bei mir wird es momentan nämlich einfach nur mit 0 ersetzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/204989/null-makro-__cplusplus</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Apr 2026 17:10:43 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/204989.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 09 Feb 2008 01:28:14 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 01:28:14 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">/* Define NULL pointer value */
#ifndef NULL
#ifdef __cplusplus
#define NULL    0
#else
#define NULL    ((void *)0)
#endif
#endif
</code></pre>
<p>Wann ist __cplusplus denn eigentlich definiert?<br />
Also wann genau wird NULL durch ((void *)0) ersetzt?<br />
Bei mir wird es momentan nämlich einfach nur mit 0 ersetzt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452367</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452367</guid><dc:creator><![CDATA[null0]]></dc:creator><pubDate>Sat, 09 Feb 2008 01:28:14 GMT</pubDate></item><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 05:04:10 GMT]]></title><description><![CDATA[<p>null0 schrieb:</p>
<blockquote>
<p>Wann ist __cplusplus denn eigentlich definiert?</p>
</blockquote>
<p>ISO/IEC 14882:2003 (E) schrieb:</p>
<blockquote>
<p>16.8 Predefined macro names [cpp.predefined]<br />
1 The following macro names shall be defined by the implementation:</p>
<p>[...]</p>
<p>__cplusplus The name <code>__cplusplus</code> is defined to the value <code>199711L</code> when compiling a C++ translation unit.</p>
</blockquote>
<p>null0 schrieb:</p>
<blockquote>
<p>Also wann genau wird NULL durch ((void *)0) ersetzt?</p>
</blockquote>
<p>Ne, umgedreht: Wann genau wird <code>NULL</code> durch <code>0</code> ersetzt?</p>
<p>null0 schrieb:</p>
<blockquote>
<p>Bei mir wird es momentan nämlich einfach nur mit 0 ersetzt.</p>
</blockquote>
<p>ISO/IEC 14882:2003 (E) schrieb:</p>
<blockquote>
<p>4.10 Pointer conversions [conv.ptr]<br />
1 A null pointer constant is an integral constant expression (5.19) rvalue of integer type that evaluates to<br />
zero. A null pointer constant can be converted to a pointer type; the result is the null pointer value of that<br />
type and is distinguishable from every other value of pointer to object or pointer to function type.[...]</p>
</blockquote>
<p>Gratuliere, du Kompilierst C++ Code mit einem C++ Compiler.</p>
<p>BTW: In reinem C++ Code ist die Verwendung von <code>0</code> statt <code>NULL</code> in Mode.</p>
<p>greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452380</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452380</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sat, 09 Feb 2008 05:04:10 GMT</pubDate></item><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 07:39:57 GMT]]></title><description><![CDATA[<blockquote>
<p>BTW: In reinem C++ Code ist die Verwendung von 0 statt NULL in Mode.</p>
</blockquote>
<p>Zum Glück muss man nicht jede Mode mitmachen...</p>
<p>NULL ist manchmal besser zu lesen als 0! Just my 2 cents</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452395</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452395</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sat, 09 Feb 2008 07:39:57 GMT</pubDate></item><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 08:44:09 GMT]]></title><description><![CDATA[<p>Martin Richter schrieb:</p>
<blockquote>
<p>NULL ist manchmal besser zu lesen als 0! Just my 2 cents</p>
</blockquote>
<p>Ist wohl wieder 'mal eine Glaubensfrage <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>
<p>greetz, Swordfish</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452403</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452403</guid><dc:creator><![CDATA[Swordfish]]></dc:creator><pubDate>Sat, 09 Feb 2008 08:44:09 GMT</pubDate></item><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 10:23:16 GMT]]></title><description><![CDATA[<p>Und wann wird ((void *)0) benutzt?</p>
<p>Ich habe meiner Datei die Endung *.c gegeben.<br />
Wird das dann trotzdem mit einem C++-Kompiler und dem Makro __cplusplus kompiliert/gelinkt?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452437</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452437</guid><dc:creator><![CDATA[null0]]></dc:creator><pubDate>Sat, 09 Feb 2008 10:23:16 GMT</pubDate></item><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 11:04:38 GMT]]></title><description><![CDATA[<p>Nein, wenn Deine Datei die Endung *.c hat, wird es also C compiliert. Das kannst Du aber mit Project-Settings für die Datei wieder ändern (/Tp)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452454</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452454</guid><dc:creator><![CDATA[Jochen Kalmbach]]></dc:creator><pubDate>Sat, 09 Feb 2008 11:04:38 GMT</pubDate></item><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 11:25:20 GMT]]></title><description><![CDATA[<p>Das Makro __cplusplus war aber trotzdem definiert..</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452456</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452456</guid><dc:creator><![CDATA[null0]]></dc:creator><pubDate>Sat, 09 Feb 2008 11:25:20 GMT</pubDate></item><item><title><![CDATA[Reply to NULL Makro (__cplusplus on Sat, 09 Feb 2008 20:13:38 GMT]]></title><description><![CDATA[<p>Martin Richter schrieb:</p>
<blockquote>
<p>Zum Glück muss man nicht jede Mode mitmachen...</p>
<p>NULL ist manchmal besser zu lesen als 0! Just my 2 cents</p>
</blockquote>
<p>Ein Grund mehr, sich auf nullptr zu freuen :p</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1452756</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1452756</guid><dc:creator><![CDATA[audacia]]></dc:creator><pubDate>Sat, 09 Feb 2008 20:13:38 GMT</pubDate></item></channel></rss>