<?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[Ordner kopieren]]></title><description><![CDATA[<p>hey leute,<br />
ich würde gerne ein programm schreiben, dass einen Ordner kopiert und in einem anderen Ordner mit _x abspeichert.<br />
Pfad is z.b.: C:\Dokumente und Einstellungen\USER\Desktop\Dokumente<br />
Zielpfad ist z.b.: D:\Dokumente_x</p>
<p>mir kommt es jetzt im moment noch nicht darum dass der Pfad genau passt (mein damit, der pfad kann sich noch ändern), sondern nur, wie kopier ich ein Ordern wo anderst hin.</p>
<p>gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/295641/ordner-kopieren</link><generator>RSS for Node</generator><lastBuildDate>Fri, 14 Aug 2026 03:14:44 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/295641.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 18 Nov 2011 10:36:26 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 10:36:26 GMT]]></title><description><![CDATA[<p>hey leute,<br />
ich würde gerne ein programm schreiben, dass einen Ordner kopiert und in einem anderen Ordner mit _x abspeichert.<br />
Pfad is z.b.: C:\Dokumente und Einstellungen\USER\Desktop\Dokumente<br />
Zielpfad ist z.b.: D:\Dokumente_x</p>
<p>mir kommt es jetzt im moment noch nicht darum dass der Pfad genau passt (mein damit, der pfad kann sich noch ändern), sondern nur, wie kopier ich ein Ordern wo anderst hin.</p>
<p>gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2145911</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2145911</guid><dc:creator><![CDATA[FlorianB]]></dc:creator><pubDate>Fri, 18 Nov 2011 10:36:26 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 10:38:25 GMT]]></title><description><![CDATA[<p>Mit standard c++ wird das schwierig (außer wenn der neue standard da was hat was ich nicht glaube). Du brauchst dafür eine bibliothek wie qt oder boost, oder du musst direkt auf die api deines betriebssystems zugreifen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2145915</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2145915</guid><dc:creator><![CDATA[*Q* 1]]></dc:creator><pubDate>Fri, 18 Nov 2011 10:38:25 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 10:42:54 GMT]]></title><description><![CDATA[<p>FlorianB schrieb:</p>
<blockquote>
<p>wie kopier ich ein Ordern wo anderst hin.</p>
</blockquote>
<p>Der Fragestellung nach zu urteilen, gehe ich mal davon aus, dass du dir die mit wichtig gekennzeichneten Threads im Forum noch nicht gelesen hast. Ferner gehe ich davon aus, dass du noch nicht versucht hast, auf Linux umzusteigen, d.h. du dürftest Windows-User sein.</p>
<p>Antwort auf deine Frage:</p>
<ol>
<li>Öffne den Windows Explorer</li>
<li>Navigiere in den Ordner C:\Dokumente und Einstellungen\USER\Desktop</li>
<li>Rechtsklick auf den Ordner Dokumente</li>
<li>Im Kontextmenü den Eintrag &quot;kopieren&quot; auswählen</li>
<li>Navigiere nach D:\</li>
<li>Rechtsklick in den freien Bereich</li>
<li>Im kontextmenü Eintrag &quot;Einfügen&quot; wählen</li>
<li>Ordner Dokumente auswählen (nicht öffnen) und F2 drücken.</li>
<li>_x an den Ordnernamen anhängen, dann Enter.</li>
</ol>
<p>Fertig.</p>
<p>Nicht die gewünschte Antwort? Dann schau dir deine Frage nochmal an, da könnte es dran liegen. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f644.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_rolling_eyes"
      title=":rolling_eyes:"
      alt="🙄"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2145918</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2145918</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Fri, 18 Nov 2011 10:42:54 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 11:14:21 GMT]]></title><description><![CDATA[<p>Also ich füge noch hinzu:<br />
ich bin windows xp user<br />
würde es gern wenn möglich mit c++ machen in visual studio 2008 machen<br />
es kann auch eine grafische Oberfläche haben, z.b. in Richtung GetOpenFile<br />
ich hoffe jetzt hab ich es genauer beschreiben.</p>
<p>Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2145936</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2145936</guid><dc:creator><![CDATA[FlorianB]]></dc:creator><pubDate>Fri, 18 Nov 2011 11:14:21 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 11:27:59 GMT]]></title><description><![CDATA[<p>Wenn es dir recht ist, mit <a href="http://www.c-plusplus.net/forum/89260" rel="nofollow">WINAPI</a> (zweiter Eintrag bei Google)</p>
<p>Und an deinem Deutsch (bzw. deiner Grammatik) musst du auch noch arbeiten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2145944</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2145944</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Fri, 18 Nov 2011 11:27:59 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 11:29:49 GMT]]></title><description><![CDATA[<p>Da gibt es in der WinAPI die Funktion<br />
<a href="http://msdn.microsoft.com/en-us/library/windows/desktop/bb762164%28v=vs.85%29.aspx" rel="nofollow">http://msdn.microsoft.com/en-us/library/windows/desktop/bb762164(v=vs.85).aspx</a><br />
für.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2145946</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2145946</guid><dc:creator><![CDATA[Belli]]></dc:creator><pubDate>Fri, 18 Nov 2011 11:29:49 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 14:03:06 GMT]]></title><description><![CDATA[<p>Ich persönlich würde dir empfehlen die boost-bibliothek zu benuzten. Das hat den Vorteil, dass du dei Programm unter verschiedenen Betriebssystemen kompilieren kannst ohne es gleich komplett neu zu schreiben.</p>
<p><a href="http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/index.htm" rel="nofollow">http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/index.htm</a></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2146017</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2146017</guid><dc:creator><![CDATA[MrKnister]]></dc:creator><pubDate>Fri, 18 Nov 2011 14:03:06 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 18 Nov 2011 16:10:49 GMT]]></title><description><![CDATA[<p>MrKnister schrieb:</p>
<blockquote>
<p>Ich persönlich würde dir empfehlen die boost-bibliothek zu benuzten. Das hat den Vorteil, dass du dei Programm unter verschiedenen Betriebssystemen kompilieren kannst ohne es gleich komplett neu zu schreiben.</p>
<p><a href="http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/index.htm" rel="nofollow">http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/index.htm</a></p>
</blockquote>
<p>Viel wichtig ist, dass Boost die Arbeit deutlich vereinfacht. Siehe:<br />
<a href="http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/reference.html#copy_directory" rel="nofollow">http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/reference.html#copy_directory</a></p>
<p>Und vergleiche mit <code>SHFileOperation</code> <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f609.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--winking_face"
      title=";)"
      alt="😉"
    /></p>
<p>Die Frage darf aber auch in den Raum gesetzt werden, ob FlorianB in der Lage ist, Boost einzurichten und zu verwenden. Daher ist am Ende für ihn vielleicht <code>SHFileOperation</code> doch einfacher.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2146049</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2146049</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Fri, 18 Nov 2011 16:10:49 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 25 Nov 2011 07:05:25 GMT]]></title><description><![CDATA[<p>Hey Leute,<br />
so mit dem Ordner kopieren bin ich größtenteils klar gekommen.<br />
Wie kann ich nun die einzelnen Dateien in dem Ordner in ein Array speichern, um sie dann weiter zu bearbeiten?<br />
Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2148593</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2148593</guid><dc:creator><![CDATA[FlorianB]]></dc:creator><pubDate>Fri, 25 Nov 2011 07:05:25 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 25 Nov 2011 07:37:49 GMT]]></title><description><![CDATA[<p>WinAPI-Weg: FindFirstFile/FindNextFile und in einer do-while-Schleife die Pfade der gefundenen Ordner und Dateien geschickterweise einem std::vector<a href="std::string" rel="nofollow">std::string</a> hinzufügen (Details in der WinAPI-FAQ).</p>
<p>Oder eben boost (<a href="http://www.boost.org/doc/libs/1_48_0/libs/filesystem/v3/doc/tutorial.html#Directory-iteration" rel="nofollow">hier</a> ist ein kurzes Beispiel).</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2148598</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2148598</guid><dc:creator><![CDATA[Thorgrim]]></dc:creator><pubDate>Fri, 25 Nov 2011 07:37:49 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Thu, 15 Dec 2011 14:22:17 GMT]]></title><description><![CDATA[<p>Hey leute,</p>
<p>ma noch ne kurze Frage zu SHFileOperation:</p>
<p>Ich hab jetzt folgenden Code:</p>
<pre><code class="language-cpp">.
.
.
	LPTSTR inputPath; //wir durch eine Textfeld mit nem Pfad gefüllt
	LPTSTR copyPath; //ebenso durch ein Textfeld

	SHFILEOPSTRUCT sf;
	memset(&amp;sf,0,sizeof(sf));
	sf.hwnd = 0;
	sf.wFunc = FO_COPY;
	sf.pFrom = inputPath;	//Pfad von Dateiordner
	sf.pTo = copyPath;		//Pfad der Kopie
	sf.fFlags = FOF_NOCONFIRMATION | FOF_NOCONFIRMMKDIR | FOF_NOERRORUI | FOF_SIMPLEPROGRESS;
.
.
.
</code></pre>
<p>So nun zu meiner Frage:<br />
so wie es jetzt im moment ist, funktioniert das Kopieren noch nicht. Den Fehler hab ich nach langem suchen selber rausgefunden.<br />
Der Pfad der in inputPath bzw in copyPath geschrieben wird, sieht so aus:<br />
inputPath: D:\USER\Test<br />
copyPath: D:\Test</p>
<p>die SHFileOperation Funktion brauch zum kopieren aber einen Pfad mit doppelten \ Zeichen.<br />
Gibt es dazu ne Funktion die das automatisch macht, also aus<br />
D:\USER\Test soll<br />
D:\\USER\\Test werden.</p>
<p>Oda kann ich die SHFileOperation anderst einstellen, dass es auch mit einfachem \ Zeichen funktioniert?</p>
<p>gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2157291</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2157291</guid><dc:creator><![CDATA[FlorianB]]></dc:creator><pubDate>Thu, 15 Dec 2011 14:22:17 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Thu, 15 Dec 2011 18:19:37 GMT]]></title><description><![CDATA[<p>\\ ist eine Escape-Sequenz. Denn das \ Zeichen wird für andere Sachen gebraucht.<br />
Nimm lieber /.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2157406</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2157406</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Thu, 15 Dec 2011 18:19:37 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 16 Dec 2011 07:33:04 GMT]]></title><description><![CDATA[<p>Also den Pfad nehm ich mithilfe eines OpenFileDialog auf.<br />
Wie meinst du das mit / ?<br />
Wenn ich einen Pfad angebe, der / statt \\ enthält, funktioniert das Kopieren nicht. Oder hast du das jetzt anderst gemeint?<br />
Im Prinzip such ich nur ne Möglichkeit, wie ich aus den \ automatisch \\ machen kann.<br />
Gruß</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2157527</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2157527</guid><dc:creator><![CDATA[FlorianB]]></dc:creator><pubDate>Fri, 16 Dec 2011 07:33:04 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Fri, 16 Dec 2011 09:57:11 GMT]]></title><description><![CDATA[<p>Die meisten Libs unterstützen heutzutage auch / unter Windows. Das ist dann etwas einfacher zu handhaben, besonders wenn man das Programm noch unter z.B. Linux verwendet wo sowieso / zum Einsatz kommt.<br />
Da die Funktion anscheinen auf \\ besteht, hier eine Funktion um aus \ ein \\ zu machen:</p>
<pre><code>std::string doubleBackslash(std::string input)
{
    std::string output;
    for (int i=0;i &lt; input.size();++i)
    {
        output += input[i];
        if (input[i] == '\\') output += '\\';
    }
    return output;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/2157573</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2157573</guid><dc:creator><![CDATA[Osbios]]></dc:creator><pubDate>Fri, 16 Dec 2011 09:57:11 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Tue, 10 Jan 2012 14:40:59 GMT]]></title><description><![CDATA[<p>Hey Leute,<br />
gutes neues erst mal noch <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":-)"
      alt="🙂"
    /></p>
<p>Danke mal an Osbios! Der Code funzt super. Nur hab ich es jetzt mal in mein Programm eingebaut und das liefert mir den Pfad in einem LPTSTR. Wie wandel ich diesen in einen normal string um, um ihn zu bearbeiten?</p>
<p>Hab schon google durchforstet aber nichts passendes gefunden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /></p>
<p>MfG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166354</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166354</guid><dc:creator><![CDATA[FlorianB]]></dc:creator><pubDate>Tue, 10 Jan 2012 14:40:59 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Tue, 10 Jan 2012 15:10:50 GMT]]></title><description><![CDATA[<p>FlorianB schrieb:</p>
<blockquote>
<p>Hab schon google durchforstet aber nichts passendes gefunden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61e.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--disappointed_face"
      title=":-("
      alt="😞"
    /></p>
</blockquote>
<p>Bezweifle ich mal ganz arg. Zwei Schritte:</p>
<ol>
<li>google mal nach LPSTR und finde gleich im allerersten Link, was ein LPSTR tatsächlich ist.</li>
<li>überlege, wie man sowas wohl in einen std::string konvertieren kann (zur Not C++-Referenz bemühen, sollte aber jeder nach den ersten Kapiteln im Anfängerbuch verinnerlicht haben)</li>
</ol>
]]></description><link>https://www.c-plusplus.net/forum/post/2166374</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166374</guid><dc:creator><![CDATA[pumuckl]]></dc:creator><pubDate>Tue, 10 Jan 2012 15:10:50 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Tue, 10 Jan 2012 16:03:00 GMT]]></title><description><![CDATA[<p>pumuckl schrieb:</p>
<blockquote>
<p>überlege, wie man sowas wohl in einen std::string konvertieren kann (zur Not C++-Referenz bemühen, sollte aber jeder nach den ersten Kapiteln im Anfängerbuch verinnerlicht haben)</p>
</blockquote>
<pre><code class="language-cpp">LPSTR str(const_cast&lt;char*&gt;(&quot;ooooo&quot;));
        std::string meinstring(str);
</code></pre>
<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/9960">@pumuckl</a>: Ich bezweifle stark, dass du seinen Post richtig gelesen hast.</p>
<p>pumuckl schrieb:</p>
<blockquote>
<ol>
<li>google mal nach <strong>LPSTR</strong> und finde gleich im allerersten Link, was ein <strong>LPSTR</strong> tatsächlich ist.</li>
</ol>
</blockquote>
<p>FlorianB schrieb:</p>
<blockquote>
<p>Nur hab ich es jetzt mal in mein Programm eingebaut und das liefert mir den Pfad in einem <strong>LPTSTR</strong>.</p>
</blockquote>
<p>Ist (bzw. sollte) aber sowieso das Gleiche sein, also diesmal nich' so schlimm <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f576.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--sunglasses"
      title=":sunglasses:"
      alt="🕶"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166398</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166398</guid><dc:creator><![CDATA[[[global:guest]]]]></dc:creator><pubDate>Tue, 10 Jan 2012 16:03:00 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Wed, 11 Jan 2012 10:56:51 GMT]]></title><description><![CDATA[<p>Hey,</p>
<p>vielen dank an Hacker.</p>
<p>Wenn ich es in einem leeren Projekt teste funktioniert alles.</p>
<p>Wenn ich es in mein richtiges Programm einbaue, kriege ich folgende Fehlermeldung:</p>
<p>error C2664: 'std::basic_string&lt;_Elem,_Traits,_Ax&gt;::basic_string(const std::allocator&lt;_Ty&gt; &amp;)': Konvertierung des Parameters 1 von 'LPTSTR' in 'const std::allocator&lt;_Ty&gt; &amp;' nicht möglich</p>
<p>An was kann das liegen?<br />
MFG</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166675</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166675</guid><dc:creator><![CDATA[FlorianB]]></dc:creator><pubDate>Wed, 11 Jan 2012 10:56:51 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Wed, 11 Jan 2012 11:12:57 GMT]]></title><description><![CDATA[<pre><code class="language-cpp">typedef std::basic_string&lt;TCHAR&gt; tstring;
</code></pre>
<p>Und ab dann tstring statt string/wstring nutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166686</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166686</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Wed, 11 Jan 2012 11:12:57 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Wed, 11 Jan 2012 11:23:27 GMT]]></title><description><![CDATA[<p>Ist für dein Projekt Unicode aktiviert?<br />
Übrigens verlangt <code>SHFileOperation</code> für die beiden Member <code>pFrom</code> und <code>pTo</code> der Struktur <code>SHFILEOPSTRUCT</code> , dass sie doppelt nullterminiert sind. Ich weiß nicht, ob <code>string::c_str</code> das erfüllt, auch wenn man ein zusätzliches '0' anhängt.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166688</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166688</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Wed, 11 Jan 2012 11:23:27 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Wed, 11 Jan 2012 11:37:35 GMT]]></title><description><![CDATA[<p>DocShoe schrieb:</p>
<blockquote>
<p>Ist für dein Projekt Unicode aktiviert?<br />
Übrigens verlangt <code>SHFileOperation</code> für die beiden Member <code>pFrom</code> und <code>pTo</code> der Struktur <code>SHFILEOPSTRUCT</code> , dass sie doppelt nullterminiert sind. Ich weiß nicht, ob <code>string::c_str</code> das erfüllt, auch wenn man ein zusätzliches '0' anhängt.</p>
</blockquote>
<p>Klar, ein std::string kann billig viele Nullen im Content haben und c_str hängt noch eine weitere an.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166696</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166696</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Wed, 11 Jan 2012 11:37:35 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Wed, 11 Jan 2012 12:17:00 GMT]]></title><description><![CDATA[<p>Ethon schrieb:</p>
<blockquote>
<p>Klar, ein std::string kann billig viele Nullen im Content haben und c_str hängt noch eine weitere an.</p>
</blockquote>
<p>Ist das tatsächlich so? Hast du vielleicht den Passus aus dem Standard zur Hand?<br />
Klar kann ich beliebig viele 0 anhängen, aber ist denn garantiert, dass <code>c_str()</code> einen Zeiger auf den kompletten Inhalt des Strings zurückgibt oder nur bis zur ersten 0?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166711</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166711</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Wed, 11 Jan 2012 12:17:00 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Wed, 11 Jan 2012 12:25:15 GMT]]></title><description><![CDATA[<p>Naja, zb Cpp-Reference sagt:</p>
<blockquote>
<p>Returns a pointer to a null-terminated character array with data equivalent to those stored in the string. The pointer is such that the range [c_str(); c_str() + size()] is valid and the values in it correspond to the values stored in the string with an additional null character after the last position.</p>
</blockquote>
]]></description><link>https://www.c-plusplus.net/forum/post/2166716</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166716</guid><dc:creator><![CDATA[Ethon]]></dc:creator><pubDate>Wed, 11 Jan 2012 12:25:15 GMT</pubDate></item><item><title><![CDATA[Reply to Ordner kopieren on Wed, 11 Jan 2012 13:38:43 GMT]]></title><description><![CDATA[<p>Jau, reicht, bin zufrieden <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f44d.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--thumbs_up"
      title=":+1:"
      alt="👍"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/2166764</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/2166764</guid><dc:creator><![CDATA[DocShoe]]></dc:creator><pubDate>Wed, 11 Jan 2012 13:38:43 GMT</pubDate></item></channel></rss>