<?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[DirectoryListBox Problem]]></title><description><![CDATA[<p>jedesmal wenn ich einer DirectoryListBox ein Verzeichnis öffne, legt er mir mit &quot;fstream&quot; keine neue Datei an und schreibt auch nichts hinein wenn die Datei bereits besteht</p>
<pre><code>DirectoryListBox1-&gt;Directory=test; 
ofstream aus(&quot;test.txt&quot;);
aus.write(&quot;hallo&quot;, 5);
</code></pre>
<p>woran liegt das oder mache ich da einen Fehler.<br />
ohen der ordner zuweisung funktioniert es.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/99518/directorylistbox-problem</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 04:33:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/99518.rss" rel="self" type="application/rss+xml"/><pubDate>Sat, 29 Jan 2005 10:54:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to DirectoryListBox Problem on Sat, 29 Jan 2005 10:54:30 GMT]]></title><description><![CDATA[<p>jedesmal wenn ich einer DirectoryListBox ein Verzeichnis öffne, legt er mir mit &quot;fstream&quot; keine neue Datei an und schreibt auch nichts hinein wenn die Datei bereits besteht</p>
<pre><code>DirectoryListBox1-&gt;Directory=test; 
ofstream aus(&quot;test.txt&quot;);
aus.write(&quot;hallo&quot;, 5);
</code></pre>
<p>woran liegt das oder mache ich da einen Fehler.<br />
ohen der ordner zuweisung funktioniert es.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/709450</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/709450</guid><dc:creator><![CDATA[Carpocalypse]]></dc:creator><pubDate>Sat, 29 Jan 2005 10:54:30 GMT</pubDate></item><item><title><![CDATA[Reply to DirectoryListBox Problem on Sun, 30 Jan 2005 11:10:46 GMT]]></title><description><![CDATA[<p>hat dann keiner eine Antwort auf mein Problem? <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>
]]></description><link>https://www.c-plusplus.net/forum/post/710189</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710189</guid><dc:creator><![CDATA[Carpocalypse]]></dc:creator><pubDate>Sun, 30 Jan 2005 11:10:46 GMT</pubDate></item><item><title><![CDATA[Reply to DirectoryListBox Problem on Sun, 30 Jan 2005 11:40:11 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>ich glaube, du verwechselst da etwas. Um mit fstream eine Datei in einem bestimmten Verzeichnis zu öffnen, mußt du den Pfad direkt an fstream übergeben.</p>
<pre><code class="language-cpp">ofstream aus(&quot;C:\\test.txt&quot;);
</code></pre>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/710211</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710211</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Sun, 30 Jan 2005 11:40:11 GMT</pubDate></item><item><title><![CDATA[Reply to DirectoryListBox Problem on Sun, 30 Jan 2005 12:32:47 GMT]]></title><description><![CDATA[<p>die datei befindet sich ja nicht in dem Verzeichnis was geöffnet wird. Mir geht es ja nur darum das wenn ich die Zeile:</p>
<pre><code>DirectoryListBox1-&gt;Directory=test;
</code></pre>
<p>davor setzte, legt er die Datei nicht an bzw. er schreibt nichts in die Datei.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/710265</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710265</guid><dc:creator><![CDATA[Carpocalypse]]></dc:creator><pubDate>Sun, 30 Jan 2005 12:32:47 GMT</pubDate></item><item><title><![CDATA[Reply to DirectoryListBox Problem on Sun, 30 Jan 2005 12:35:49 GMT]]></title><description><![CDATA[<pre><code>DirectoryListBox1-&gt;Directory=test; 
ofstream aus(test+&quot;\\test.txt&quot;); 
aus.write(&quot;hallo&quot;, 5);
</code></pre>
<p>meinste das?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/710268</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710268</guid><dc:creator><![CDATA[tuxman]]></dc:creator><pubDate>Sun, 30 Jan 2005 12:35:49 GMT</pubDate></item><item><title><![CDATA[Reply to DirectoryListBox Problem on Sun, 30 Jan 2005 12:46:15 GMT]]></title><description><![CDATA[<p>ne, sorry. Ich meine das jedesmal wenn ich der DirectoryListbox <strong>irgendein</strong><br />
Verzeichnis zuweise, dann schreibt er mir nichts in die Datei hinein. Was ich in die Datei schreibe und wo diese sich befindet ist vollkommen unabhängig von dem Verzeichnis der DirectoryListBox. Wenn ich es ohne der Zuweisung mache funktioniert<br />
das schreiben und anlegen ohne Probleme.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/710278</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710278</guid><dc:creator><![CDATA[Carpocalypse]]></dc:creator><pubDate>Sun, 30 Jan 2005 12:46:15 GMT</pubDate></item><item><title><![CDATA[Reply to DirectoryListBox Problem on Sun, 30 Jan 2005 17:51:17 GMT]]></title><description><![CDATA[<p>Hallo,</p>
<p>Es wäre interessant, was in &quot;test&quot; drinne steht...<br />
Denn so geht's auf jeden Fall :</p>
<pre><code>AnsiString test = ExtractFilePath(Application-&gt;ExeName);
DirectoryListBox1-&gt;Directory=test;
ofstream aus(&quot;test.txt&quot;);
aus.write(&quot;hallo&quot;, 5);
</code></pre>
<p>Allerdings, warum machst Du das so kompliziert (mit &quot;ofstream&quot;) ?<br />
Leichter wäre es doch den Inhalt, der in eine Datei gespeichert werden soll, in eine StringList zu schreiben und diese dann mit &quot;SaveToFile&quot; zu speichern...</p>
<p>Edit :<br />
Übrigens setzt &quot;DirectoryListBox1-&gt;Directory&quot; das aktuelle Verzeichnis. Wenn Du dann keinen Ort (Ordner) angibst, wird in das aktuelle, von &quot;DirectoryListBox1-&gt;Directory&quot; gesetzte Verzeichnis, geschrieben.</p>
<p>Bis dann denn,<br />
<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="🙂"
    /><br />
Nash</p>
]]></description><link>https://www.c-plusplus.net/forum/post/710537</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/710537</guid><dc:creator><![CDATA[Nash]]></dc:creator><pubDate>Sun, 30 Jan 2005 17:51:17 GMT</pubDate></item></channel></rss>