<?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[[Präprozessor] Makrodefinition]]></title><description><![CDATA[<p>Hi,</p>
<p>nur eine kurze Frage, wie mache ich das richtig?</p>
<pre><code class="language-cpp">#ifdef	_DEBUG
#define	DBG(expr)	expr
#define DBG_START	#ifdef _DEBUG
#define	DBG_END		#endif			
#else
#define DBG(expr)
#define DBG_START
#define DBG_END
#endif
</code></pre>
<p>Gruß,<br />
don_basto.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/142391/präprozessor-makrodefinition</link><generator>RSS for Node</generator><lastBuildDate>Tue, 01 Sep 2026 20:09:14 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/142391.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 30 Mar 2006 06:47:34 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to [Präprozessor] Makrodefinition on Thu, 30 Mar 2006 06:47:34 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>nur eine kurze Frage, wie mache ich das richtig?</p>
<pre><code class="language-cpp">#ifdef	_DEBUG
#define	DBG(expr)	expr
#define DBG_START	#ifdef _DEBUG
#define	DBG_END		#endif			
#else
#define DBG(expr)
#define DBG_START
#define DBG_END
#endif
</code></pre>
<p>Gruß,<br />
don_basto.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1026912</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026912</guid><dc:creator><![CDATA[don_basto]]></dc:creator><pubDate>Thu, 30 Mar 2006 06:47:34 GMT</pubDate></item><item><title><![CDATA[Reply to [Präprozessor] Makrodefinition on Thu, 30 Mar 2006 06:51:55 GMT]]></title><description><![CDATA[<p>Du kannst mit dem Präprozessor keine Präprozessor-Direktiven erzeugen (sprich: deine &quot;#define DBG_START&quot; dürfte nicht funktionieren) - du könntest die reinen Debug-Blöcke höchstens in einen nicht erreichbaren Code-Abschnitt packen, um sie zu deaktivieren:</p>
<pre><code class="language-cpp">#ifdef _DEBUG

#define DBG(ex) ex
#define DBG_START {
#define DBG_END }

#else

#define DBG(ex)
#define DBG_START if(false) {
#define DGB_END }

#endif
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1026913</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026913</guid><dc:creator><![CDATA[CStoll]]></dc:creator><pubDate>Thu, 30 Mar 2006 06:51:55 GMT</pubDate></item><item><title><![CDATA[Reply to [Präprozessor] Makrodefinition on Thu, 30 Mar 2006 08:25:47 GMT]]></title><description><![CDATA[<p>Danke.<br />
Wie du vermutet hast, haben meine Definitionen so nicht funtioniert.</p>
<p>Gruß,<br />
don_basto.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1026950</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1026950</guid><dc:creator><![CDATA[don_basto]]></dc:creator><pubDate>Thu, 30 Mar 2006 08:25:47 GMT</pubDate></item></channel></rss>