<?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[Zusammenfügen TCHAR und String]]></title><description><![CDATA[<p>Ich möchte gerne path und myPath zusammenfügen.<br />
Folgender Code:</p>
<pre><code class="language-cpp">TCHAR path[MAX_PATH];

string myPath = &quot;\\Microsoft\\test.txt&quot;;
SHGetSpecialFolderPath(0,path,CSIDL_LOCAL_APPDATA,false);

string fullPath = path + myPath;
</code></pre>
<p>Allerdings erhalte ich hier die FM:<br />
cannot add two pointers</p>
<p>Kann mir jemand helfen das Problem zu lösen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/157512/zusammenfügen-tchar-und-string</link><generator>RSS for Node</generator><lastBuildDate>Wed, 09 Sep 2026 02:33:41 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157512.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 26 Aug 2006 16:28:17 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 16:28:17 GMT]]></title><description><![CDATA[<p>Ich möchte gerne path und myPath zusammenfügen.<br />
Folgender Code:</p>
<pre><code class="language-cpp">TCHAR path[MAX_PATH];

string myPath = &quot;\\Microsoft\\test.txt&quot;;
SHGetSpecialFolderPath(0,path,CSIDL_LOCAL_APPDATA,false);

string fullPath = path + myPath;
</code></pre>
<p>Allerdings erhalte ich hier die FM:<br />
cannot add two pointers</p>
<p>Kann mir jemand helfen das Problem zu lösen ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125016</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125016</guid><dc:creator><![CDATA[rockItnow]]></dc:creator><pubDate>Sat, 26 Aug 2006 16:28:17 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 16:45:09 GMT]]></title><description><![CDATA[<p>string fullPath(path);<br />
fullpath += myPath;</p>
<p>oder string fullpath = string(path) + myPath; ... sieht schöner aus, aber kopiert etwas mehr rum.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125026</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125026</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Sat, 26 Aug 2006 16:45:09 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 16:49:22 GMT]]></title><description><![CDATA[<p>Hi,<br />
danke für die Antwort.</p>
<p>Hier erscheint allerdings der Fehler<br />
Cannot convert from TCHAT[260] to std::string</p>
<p>Noch eine Idee ?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125032</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125032</guid><dc:creator><![CDATA[rockItnow]]></dc:creator><pubDate>Sat, 26 Aug 2006 16:49:22 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 16:56:59 GMT]]></title><description><![CDATA[<p>hm... was isn TCHAR? kannst du das nicht einfach durch char ersetzen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125038</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125038</guid><dc:creator><![CDATA[DrGreenthumb]]></dc:creator><pubDate>Sat, 26 Aug 2006 16:56:59 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 16:59:56 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">typedef std::basic_string&lt;TCHAR&gt; tstring;

tstring tstr = ...
</code></pre>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125042</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125042</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Sat, 26 Aug 2006 16:59:56 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 17:00:28 GMT]]></title><description><![CDATA[<p>DrGreenthumb schrieb:</p>
<blockquote>
<p>hm... was isn TCHAR? kannst du das nicht einfach durch char ersetzen?</p>
</blockquote>
<p>Nein, das geht nicht. TCHAR ist je nach Compilersetting ein Unicode- oder ein ANSI-Character.</p>
<p>MfG SideWinder</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125044</guid><dc:creator><![CDATA[SideWinder]]></dc:creator><pubDate>Sat, 26 Aug 2006 17:00:28 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 17:19:40 GMT]]></title><description><![CDATA[<p>SideWinder schrieb:</p>
<blockquote>
<p>TCHAR ist je nach Compilersetting ein Unicode- oder ein ANSI-Character.</p>
</blockquote>
<p>von diesem compilersetting könnte man ja abhänging machen, ob man std::string oder std::wstring nimmt (ein std::TSTRING oder sowas ;))</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125054</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125054</guid><dc:creator><![CDATA[net 0]]></dc:creator><pubDate>Sat, 26 Aug 2006 17:19:40 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 20:07:42 GMT]]></title><description><![CDATA[<p>Hmm,</p>
<p>jetzt habe ich ein tstring und nun ?</p>
<p>Kann mir jemand erklären wie ich den Pfad jetzt zusammensetze ?</p>
<pre><code class="language-cpp">TCHAR path[MAX_PATH];

	SHGetSpecialFolderPath(0,path,CSIDL_LOCAL_APPDATA,false);

	string myPath =&quot;\\Micrsoft\\test.properties&quot;;	
	tstring tStr = path;

	remove(tStr + myPath);
</code></pre>
<p>Ich erhalte immer den Fehler C2784<br />
could not deduce template argument for 'const std::basic_string&lt;_Elem,_Traits,_Alloc&gt; &amp;' from 'std::string'</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125141</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125141</guid><dc:creator><![CDATA[rockItnow]]></dc:creator><pubDate>Sat, 26 Aug 2006 20:07:42 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 20:25:52 GMT]]></title><description><![CDATA[<p>Du solltest dich entscheiden, entweder alles ANSI (--&gt; keine Windows Unicodefunktionen) oder alles Unicode (--&gt; nur std::wstring)!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125146</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125146</guid><dc:creator><![CDATA[Thomas ** 0]]></dc:creator><pubDate>Sat, 26 Aug 2006 20:25:52 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 21:40:41 GMT]]></title><description><![CDATA[<p>...oder nur tstring (als typedef auf basic_string&lt;TCHAR&gt;) - dann kompiliert es automatisch als short string oder wide string - aber wenn dann bitte konsequent tstring verwenden...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125170</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125170</guid><dc:creator><![CDATA[LordJaxom]]></dc:creator><pubDate>Sat, 26 Aug 2006 21:40:41 GMT</pubDate></item><item><title><![CDATA[Reply to Zusammenfügen TCHAR und String on Sat, 26 Aug 2006 21:55:46 GMT]]></title><description><![CDATA[<p>Aber dann nen _T Makro oder so verwenden für die Literals.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1125174</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1125174</guid><dc:creator><![CDATA[Thomas ** 0]]></dc:creator><pubDate>Sat, 26 Aug 2006 21:55:46 GMT</pubDate></item></channel></rss>