<?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[string --&amp;gt; const CHAR*]]></title><description><![CDATA[<p>ich will CopyFile(pfad,pfad2,true);<br />
benutzten, leider muss pfad ein const CHAR* sein. Ich kann aber nur ein String einlesen und möchter jetzt wissen, wie ich den String jetzt umwandle.</p>
<p>UPS ich hatte das geschrieben:</p>
<pre><code class="language-cpp">CopyFile(ordner[1].c_str(), pfad, TRUE);
</code></pre>
<p>und er sagt unable to convert... hab dabei gedacht .c_str() wär falsch dabei hab ich<br />
[cpp]<br />
CopyFile(ordner[1].c_str(), <strong>pfad</strong>, TRUE);<br />
[/cpp]<br />
ganz vergessen grmpf...<br />
so ists richtig:</p>
<pre><code class="language-cpp">CopyFile(ordner[1].c_str(), pfad.c_str(), TRUE);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/topic/241521/string-gt-const-char</link><generator>RSS for Node</generator><lastBuildDate>Mon, 21 Sep 2026 11:08:08 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/241521.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 May 2009 19:17:32 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to string --&amp;gt; const CHAR* on Thu, 21 May 2009 19:23:11 GMT]]></title><description><![CDATA[<p>ich will CopyFile(pfad,pfad2,true);<br />
benutzten, leider muss pfad ein const CHAR* sein. Ich kann aber nur ein String einlesen und möchter jetzt wissen, wie ich den String jetzt umwandle.</p>
<p>UPS ich hatte das geschrieben:</p>
<pre><code class="language-cpp">CopyFile(ordner[1].c_str(), pfad, TRUE);
</code></pre>
<p>und er sagt unable to convert... hab dabei gedacht .c_str() wär falsch dabei hab ich<br />
[cpp]<br />
CopyFile(ordner[1].c_str(), <strong>pfad</strong>, TRUE);<br />
[/cpp]<br />
ganz vergessen grmpf...<br />
so ists richtig:</p>
<pre><code class="language-cpp">CopyFile(ordner[1].c_str(), pfad.c_str(), TRUE);
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1713886</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1713886</guid><dc:creator><![CDATA[5cript]]></dc:creator><pubDate>Thu, 21 May 2009 19:23:11 GMT</pubDate></item><item><title><![CDATA[Reply to string --&amp;gt; const CHAR* on Thu, 21 May 2009 19:23:28 GMT]]></title><description><![CDATA[<p>pfad.c_str()</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1713894</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1713894</guid><dc:creator><![CDATA[Firefighter]]></dc:creator><pubDate>Thu, 21 May 2009 19:23:28 GMT</pubDate></item></channel></rss>