<?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[debug-Makro]]></title><description><![CDATA[<p>Hi, ich befinde mich in der ungluecklichen Lage, mit cout-Statements debuggen zu muessen um die Variablen-Inhalte auszugeben, sowas wie n Debugger gibts in der Umgebung mit der ich arbeiten muss leider nicht.<br />
da ich nicht fuer jede einzelne Variable ein</p>
<pre><code class="language-cpp">cout &lt;&lt; &quot;VariableX: &quot; &lt;&lt; VariableX &lt;&lt; '\n';
</code></pre>
<p>hinschreiben moechte, hab ich gedacht, ausnahmsweise mal ein Makro zu benutzen, in etwa</p>
<pre><code class="language-cpp">#define DEBUGOUT(var) cout &lt;&lt; &quot;var: &quot; &lt;&lt; var &lt;&lt; '\n'
</code></pre>
<p>Leider sieht der Output noch nicht ganz so aus wie erwartet:<br />
[code]var: 14[/cpp] (sollte eigentlich &quot;linecount: 14&quot; heissen)<br />
Wie gehts richtig?</p>
<p>Ich muss zugeben, ich bin mit der Syntax von Makros nicht wirklich vertraut, da ich bisher immer drum herumgekommen bin, welche zu benutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/204841/debug-makro</link><generator>RSS for Node</generator><lastBuildDate>Thu, 08 Oct 2026 18:03:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/204841.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 07 Feb 2008 14:36:24 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to debug-Makro on Thu, 07 Feb 2008 14:36:24 GMT]]></title><description><![CDATA[<p>Hi, ich befinde mich in der ungluecklichen Lage, mit cout-Statements debuggen zu muessen um die Variablen-Inhalte auszugeben, sowas wie n Debugger gibts in der Umgebung mit der ich arbeiten muss leider nicht.<br />
da ich nicht fuer jede einzelne Variable ein</p>
<pre><code class="language-cpp">cout &lt;&lt; &quot;VariableX: &quot; &lt;&lt; VariableX &lt;&lt; '\n';
</code></pre>
<p>hinschreiben moechte, hab ich gedacht, ausnahmsweise mal ein Makro zu benutzen, in etwa</p>
<pre><code class="language-cpp">#define DEBUGOUT(var) cout &lt;&lt; &quot;var: &quot; &lt;&lt; var &lt;&lt; '\n'
</code></pre>
<p>Leider sieht der Output noch nicht ganz so aus wie erwartet:<br />
[code]var: 14[/cpp] (sollte eigentlich &quot;linecount: 14&quot; heissen)<br />
Wie gehts richtig?</p>
<p>Ich muss zugeben, ich bin mit der Syntax von Makros nicht wirklich vertraut, da ich bisher immer drum herumgekommen bin, welche zu benutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1451260</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451260</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Thu, 07 Feb 2008 14:36:24 GMT</pubDate></item><item><title><![CDATA[Reply to debug-Makro on Thu, 07 Feb 2008 14:40:24 GMT]]></title><description><![CDATA[<p>Du möchtest den Wortlaut in Klammern als String auf der Ausgabe haben?</p>
<pre><code class="language-cpp">#define DEBUGOUT(val) cout &lt;&lt; # val &lt;&lt; &quot;: &quot; &lt;&lt; val &lt;&lt; endl;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1451263</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451263</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Thu, 07 Feb 2008 14:40:24 GMT</pubDate></item><item><title><![CDATA[Reply to debug-Makro on Thu, 07 Feb 2008 15:56:20 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">#define DEBUGOUT(var) cout &lt;&lt; __LINE__ &lt;&lt; var &lt;&lt; '\n'
</code></pre>
<p>?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1451334</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451334</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 07 Feb 2008 15:56:20 GMT</pubDate></item><item><title><![CDATA[Reply to debug-Makro on Thu, 07 Feb 2008 16:41:50 GMT]]></title><description><![CDATA[<p>Jaxoms wars was ich gesucht hab, danke euch beiden <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/1451370</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1451370</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Thu, 07 Feb 2008 16:41:50 GMT</pubDate></item></channel></rss>