<?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[C-String -&amp;gt; cannot add two pointers]]></title><description><![CDATA[<p>Hi, ich hab ein kleines Problem.<br />
Folgende zeile läßt sich nicht compilieren:</p>
<pre><code>char cPath[MAX_PATH+1];
[...]
MoveFile(__argv[0],cPath + &quot;\\test.exe&quot;);
</code></pre>
<p>Es kommt die oben beschriebene Fehlermeldung. gibt es ne möglichkeit an cPath &quot;\\blabla.exe&quot; anzuhängen?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/75442/c-string-gt-cannot-add-two-pointers</link><generator>RSS for Node</generator><lastBuildDate>Fri, 17 Jul 2026 17:50:13 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/75442.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 31 May 2004 18:09:31 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 18:09:31 GMT]]></title><description><![CDATA[<p>Hi, ich hab ein kleines Problem.<br />
Folgende zeile läßt sich nicht compilieren:</p>
<pre><code>char cPath[MAX_PATH+1];
[...]
MoveFile(__argv[0],cPath + &quot;\\test.exe&quot;);
</code></pre>
<p>Es kommt die oben beschriebene Fehlermeldung. gibt es ne möglichkeit an cPath &quot;\\blabla.exe&quot; anzuhängen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/530472</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530472</guid><dc:creator><![CDATA[VirtualDreamsDD]]></dc:creator><pubDate>Mon, 31 May 2004 18:09:31 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 18:11:31 GMT]]></title><description><![CDATA[<p>strcat oder std::string benutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/530474</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530474</guid><dc:creator><![CDATA[Shlo]]></dc:creator><pubDate>Mon, 31 May 2004 18:11:31 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 18:11:37 GMT]]></title><description><![CDATA[<p>Ja. Am besten du arbeitest mit std::string. Dazu google oder die Forumsuche bemühen. char-Arrays sind Müll.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/530475</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530475</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 31 May 2004 18:11:37 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 18:16:55 GMT]]></title><description><![CDATA[<p>Würde ich gerne machen, doch leider verlangt die Funktion ausdrücklich einen C-String.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/530481</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530481</guid><dc:creator><![CDATA[VirtualDreamsDD]]></dc:creator><pubDate>Mon, 31 May 2004 18:16:55 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 18:23:03 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>probier's mal so:</p>
<pre><code class="language-cpp">CString str = &quot;Hallo&quot;;
str += _T(&quot; Welt!&quot;);
</code></pre>
<p>Morgen kann ich's dir genauer sagen oder du postest im MFC Forum.</p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/530492</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530492</guid><dc:creator><![CDATA[you]]></dc:creator><pubDate>Mon, 31 May 2004 18:23:03 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 18:42:20 GMT]]></title><description><![CDATA[<p>THX, aber strcat hatt das Problem gelöst.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/530511</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530511</guid><dc:creator><![CDATA[VirtualDreamsDD]]></dc:creator><pubDate>Mon, 31 May 2004 18:42:20 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 19:05:03 GMT]]></title><description><![CDATA[<p>VirtualDreamsDD schrieb:</p>
<blockquote>
<p>THX, aber strcat hatt das Problem gelöst.</p>
</blockquote>
<p>strcat ist aber Schrott. Du kannst aus einem std::string auch einen C-String bekommen:</p>
<pre><code class="language-cpp">meinString.c_str()
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/530518</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530518</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Mon, 31 May 2004 19:05:03 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Mon, 31 May 2004 19:21:06 GMT]]></title><description><![CDATA[<p>VirtualDreamsDD schrieb:</p>
<blockquote>
<p>Würde ich gerne machen, doch leider verlangt die Funktion ausdrücklich einen C-String.</p>
</blockquote>
<p>sehe kein Problem:</p>
<pre><code class="language-cpp">std::string a(&quot;test&quot;);
foo((a + &quot;test&quot;).c_str());
//oder
foo(a.append(&quot;test&quot;).c_str());
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/530529</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530529</guid><dc:creator><![CDATA[Shlo]]></dc:creator><pubDate>Mon, 31 May 2004 19:21:06 GMT</pubDate></item><item><title><![CDATA[Reply to C-String -&amp;gt; cannot add two pointers on Tue, 01 Jun 2004 08:12:03 GMT]]></title><description><![CDATA[<p>Jup, danke. Ich werde die Sachen mal bei gelegenheit probieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/530691</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/530691</guid><dc:creator><![CDATA[VirtualDreams]]></dc:creator><pubDate>Tue, 01 Jun 2004 08:12:03 GMT</pubDate></item></channel></rss>