<?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[Stringliteral: Wird nochmal &#x5C;0 angehängt, wenn letztes Zeichen schon &#x5C;0 ist?]]></title><description><![CDATA[<p>Hi!</p>
<p>Wird bei einem Stringliteral nochmals ein \0 Zeichen angehängt, auch wenn das letzte Zeichen eh schon \0 ist?</p>
<p>zB:</p>
<pre><code class="language-cpp">openFileName.lpstrFilter = &quot;Log Files ( *.lf )\0*.lf\0\0&quot;;
</code></pre>
<p>MSDN sagt nämlich:</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>OPENFILENAME Structure<br />
<strong>lpstrFilter</strong><br />
Pointer to a buffer containing pairs of null-terminated filter strings. The last string in the buffer must be terminated by <strong>two</strong> NULL characters.</p>
</blockquote>
<p>Reicht es da jetzt, wenn ich am Ende doch nur einmal \0 schreibe, da dann eh noch einmal \0 angehängt wird, oder wird eben kein \0 mehr automatisch angehängt?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/245891/stringliteral-wird-nochmal-0-angehängt-wenn-letztes-zeichen-schon-0-ist</link><generator>RSS for Node</generator><lastBuildDate>Fri, 18 Sep 2026 12:12:29 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/245891.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 20 Jul 2009 15:35:12 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Stringliteral: Wird nochmal &#x5C;0 angehängt, wenn letztes Zeichen schon &#x5C;0 ist? on Mon, 20 Jul 2009 15:35:12 GMT]]></title><description><![CDATA[<p>Hi!</p>
<p>Wird bei einem Stringliteral nochmals ein \0 Zeichen angehängt, auch wenn das letzte Zeichen eh schon \0 ist?</p>
<p>zB:</p>
<pre><code class="language-cpp">openFileName.lpstrFilter = &quot;Log Files ( *.lf )\0*.lf\0\0&quot;;
</code></pre>
<p>MSDN sagt nämlich:</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>OPENFILENAME Structure<br />
<strong>lpstrFilter</strong><br />
Pointer to a buffer containing pairs of null-terminated filter strings. The last string in the buffer must be terminated by <strong>two</strong> NULL characters.</p>
</blockquote>
<p>Reicht es da jetzt, wenn ich am Ende doch nur einmal \0 schreibe, da dann eh noch einmal \0 angehängt wird, oder wird eben kein \0 mehr automatisch angehängt?</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1746393</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1746393</guid><dc:creator><![CDATA[Kranz]]></dc:creator><pubDate>Mon, 20 Jul 2009 15:35:12 GMT</pubDate></item><item><title><![CDATA[Reply to Stringliteral: Wird nochmal &#x5C;0 angehängt, wenn letztes Zeichen schon &#x5C;0 ist? on Mon, 20 Jul 2009 15:39:26 GMT]]></title><description><![CDATA[<p>nein musst nur einmal \0 anhängen. Der Compiler hängt in jedem Fall noch ein \0 an</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1746396</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1746396</guid><dc:creator><![CDATA[player4245]]></dc:creator><pubDate>Mon, 20 Jul 2009 15:39:26 GMT</pubDate></item></channel></rss>