<?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[Problem mit AnsiString und ofstream (war: dringendes problem *help*)]]></title><description><![CDATA[<p>naja, wie es mir scheint werden solche titel immer schneller &quot;bearbeitet&quot;. schade eigentlich:</p>
<p>problem:</p>
<pre><code class="language-cpp">#include &lt;fstream.h&gt;
.
.
AnsiString pw;
pw = &quot;euer forum ist das beste&quot;;
.
.
.
ofstream f(systemdir.c_str(), ios::binary);
//im window\system32 verzeichniss
f.write(pw,sizeof(&amp;pw));
</code></pre>
<p>ja - datei wird angelegt allerdings steht folgendes in ihr:<br />
&quot;C:\W&quot;</p>
<p>das war es. das ist auch nicht binär gespeichert oder sonst irgendwas.</p>
<p>könnt ih rmir helfen?</p>
<p>danke</p>
<p>tim</p>
<p><strong>Edit:</strong><br />
Bitte aussagekräftige Überschriften wählen. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/131476/problem-mit-ansistring-und-ofstream-war-dringendes-problem-help</link><generator>RSS for Node</generator><lastBuildDate>Thu, 30 Jul 2026 10:54:37 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/131476.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Jan 2006 19:35:46 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit AnsiString und ofstream (war: dringendes problem *help*) on Wed, 04 Jan 2006 00:04:19 GMT]]></title><description><![CDATA[<p>naja, wie es mir scheint werden solche titel immer schneller &quot;bearbeitet&quot;. schade eigentlich:</p>
<p>problem:</p>
<pre><code class="language-cpp">#include &lt;fstream.h&gt;
.
.
AnsiString pw;
pw = &quot;euer forum ist das beste&quot;;
.
.
.
ofstream f(systemdir.c_str(), ios::binary);
//im window\system32 verzeichniss
f.write(pw,sizeof(&amp;pw));
</code></pre>
<p>ja - datei wird angelegt allerdings steht folgendes in ihr:<br />
&quot;C:\W&quot;</p>
<p>das war es. das ist auch nicht binär gespeichert oder sonst irgendwas.</p>
<p>könnt ih rmir helfen?</p>
<p>danke</p>
<p>tim</p>
<p><strong>Edit:</strong><br />
Bitte aussagekräftige Überschriften wählen. Danke!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/956025</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/956025</guid><dc:creator><![CDATA[dern00b]]></dc:creator><pubDate>Wed, 04 Jan 2006 00:04:19 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit AnsiString und ofstream (war: dringendes problem *help*) on Tue, 03 Jan 2006 20:01:22 GMT]]></title><description><![CDATA[<p>Die Größe eines Pointers auf pw ist wohl 4. Daher werden 4 Bytes geschrieben.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/956060</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/956060</guid><dc:creator><![CDATA[Ringding]]></dc:creator><pubDate>Tue, 03 Jan 2006 20:01:22 GMT</pubDate></item><item><title><![CDATA[Reply to Problem mit AnsiString und ofstream (war: dringendes problem *help*) on Tue, 03 Jan 2006 20:07:37 GMT]]></title><description><![CDATA[<p>Hallo</p>
<p>- Der Thread-Titel ist nicht aussagekräftig<br />
- die C++ Standardheader (nicht die VCL-Header) werden ohne .h included</p>
<pre><code class="language-cpp">#include &lt;fstream&gt;
</code></pre>
<p>- wenn du schon die VCL benutzt (AnsiString), warum benutzt du nicht einfach TFileStream, oder besser noch TStringList? Schau mal in die BCB_FAQ hier im Forum, da ist beid er TOP3 gleich ein Beirag zum Thema AnsiString-speichern<br />
- schau dir mal an, was sizeof wirklich macht. Und wie du die Länge <strong>des Inhalts</strong> eines AnsiString wirklich bekommst.</p>
<p>bis bald<br />
akari</p>
]]></description><link>https://www.c-plusplus.net/forum/post/956070</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/956070</guid><dc:creator><![CDATA[akari]]></dc:creator><pubDate>Tue, 03 Jan 2006 20:07:37 GMT</pubDate></item></channel></rss>