<?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[LPCWSTR-Variablen deklarieren??]]></title><description><![CDATA[<p>Mein Programm soll ein paar daten verschieben!!<br />
das will ich mit CopyFile realisiern!!<br />
allerdings kommt bei folgendem Code</p>
<pre><code class="language-cpp">CopyFile(&quot;Quelle.txt&quot;, &quot;Ausgabe.txt&quot;, TRUE);
</code></pre>
<p>dieser fehler:</p>
<blockquote>
<p>error C2664: 'CopyFileW' : cannot convert parameter 1 from 'const char [11]' to 'LPCWSTR'</p>
</blockquote>
<p>wenn ich das hier mache:</p>
<pre><code class="language-cpp">LPCWSTR Variable;
Variable=&quot;was weiß ich&quot;;
</code></pre>
<p>hab ich den gleichen fehler wieder!!<br />
was mach ich falsch??</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/205108/lpcwstr-variablen-deklarieren</link><generator>RSS for Node</generator><lastBuildDate>Sat, 04 Apr 2026 09:24:28 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/205108.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 10 Feb 2008 16:18:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to LPCWSTR-Variablen deklarieren?? on Sun, 10 Feb 2008 16:18:36 GMT]]></title><description><![CDATA[<p>Mein Programm soll ein paar daten verschieben!!<br />
das will ich mit CopyFile realisiern!!<br />
allerdings kommt bei folgendem Code</p>
<pre><code class="language-cpp">CopyFile(&quot;Quelle.txt&quot;, &quot;Ausgabe.txt&quot;, TRUE);
</code></pre>
<p>dieser fehler:</p>
<blockquote>
<p>error C2664: 'CopyFileW' : cannot convert parameter 1 from 'const char [11]' to 'LPCWSTR'</p>
</blockquote>
<p>wenn ich das hier mache:</p>
<pre><code class="language-cpp">LPCWSTR Variable;
Variable=&quot;was weiß ich&quot;;
</code></pre>
<p>hab ich den gleichen fehler wieder!!<br />
was mach ich falsch??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453142</guid><dc:creator><![CDATA[helo]]></dc:creator><pubDate>Sun, 10 Feb 2008 16:18:36 GMT</pubDate></item><item><title><![CDATA[Reply to LPCWSTR-Variablen deklarieren?? on Sun, 10 Feb 2008 16:29:23 GMT]]></title><description><![CDATA[<p>Verwende CopyFileA(), bzw. schalte den Unicode für dein Programm ab.<br />
oder verwende wide chars:</p>
<pre><code class="language-cpp">wchar_t Variable = L&quot;was weiß ich&quot;;
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1453148</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453148</guid><dc:creator><![CDATA[Redhead]]></dc:creator><pubDate>Sun, 10 Feb 2008 16:29:23 GMT</pubDate></item><item><title><![CDATA[Reply to LPCWSTR-Variablen deklarieren?? on Sun, 10 Feb 2008 17:31:41 GMT]]></title><description><![CDATA[<p>Oder benutze Unicode.<br />
Allerdings müssen dann die Strings auch Unicode sein:</p>
<pre><code class="language-cpp">CopyFile(L&quot;Quelle.txt&quot;, L&quot;Ausgabe.txt&quot;, TRUE);
</code></pre>
<p>Noch besser wäre:</p>
<pre><code class="language-cpp">CopyFile(_T(&quot;Quelle.txt&quot;), _T(&quot;Ausgabe.txt&quot;), TRUE);
</code></pre>
<p>Denn das _T Makro gibt dir je nach Kompiler Einstellungen eine const char* bzw. für Unicode einen const wchar_t* zurück.</p>
<p>Alles klar??</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453184</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453184</guid><dc:creator><![CDATA[simon.gysi]]></dc:creator><pubDate>Sun, 10 Feb 2008 17:31:41 GMT</pubDate></item><item><title><![CDATA[Reply to LPCWSTR-Variablen deklarieren?? on Sun, 10 Feb 2008 18:39:58 GMT]]></title><description><![CDATA[<p>also das mit CopyFileA()<br />
klappt!!<br />
mit unicode werd ich erst mal googlen was das is!!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1453236</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1453236</guid><dc:creator><![CDATA[halo]]></dc:creator><pubDate>Sun, 10 Feb 2008 18:39:58 GMT</pubDate></item></channel></rss>