<?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[ofstream binär speichern ios::binary]]></title><description><![CDATA[<p>hallo leute - habe da ein prob - an demich nicht mehr weiterkomme!</p>
<p>es geht darum das ich ein passowrd speichern möchte - aber natürlich nicht inna dateiu im ordner wo das prog läuft^^.<br />
also muss ich es auch verstecken</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>die datei wird angelegt - der schreibt ja auch was rein - aber das erscheint mir definitiv nicht das zu sein was es sein soll.<br />
mache ich was falsch - speicher ich nur die adresse ab?<br />
wäre supi wenn ihr mir helft<br />
danke</p>
<p>t i m</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/131464/ofstream-binär-speichern-ios-binary</link><generator>RSS for Node</generator><lastBuildDate>Thu, 27 Aug 2026 03:56:10 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/131464.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 03 Jan 2006 17:32:59 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ofstream binär speichern ios::binary on Tue, 03 Jan 2006 17:32:59 GMT]]></title><description><![CDATA[<p>hallo leute - habe da ein prob - an demich nicht mehr weiterkomme!</p>
<p>es geht darum das ich ein passowrd speichern möchte - aber natürlich nicht inna dateiu im ordner wo das prog läuft^^.<br />
also muss ich es auch verstecken</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>die datei wird angelegt - der schreibt ja auch was rein - aber das erscheint mir definitiv nicht das zu sein was es sein soll.<br />
mache ich was falsch - speicher ich nur die adresse ab?<br />
wäre supi wenn ihr mir helft<br />
danke</p>
<p>t i m</p>
]]></description><link>https://www.c-plusplus.net/forum/post/955877</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/955877</guid><dc:creator><![CDATA[dernn]]></dc:creator><pubDate>Tue, 03 Jan 2006 17:32:59 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream binär speichern ios::binary on Tue, 03 Jan 2006 19:48:54 GMT]]></title><description><![CDATA[<p>(mit &amp; uebergibst du eine adresse)<br />
ohne string gehts einfacher.</p>
<p>( du koenntest dass passwort auch einfach verschluesseln, indem du irgendwelche zahlen auf die chars addierst, ist dann nicht mehr direkt lesbar <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>
<pre><code class="language-cpp">#include &lt;iostream&gt;
#include &lt;fstream&gt;
using namespace std;

int main(){
   char s[]=&quot;hugo&quot;;
   cout&lt;&lt;sizeof(s);
   ofstream fo(&quot;dat.txt&quot;);
   fo.write(s,sizeof(s));
   system(&quot;pause&quot;);
   return 0;
}
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/956044</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/956044</guid><dc:creator><![CDATA[kermit1]]></dc:creator><pubDate>Tue, 03 Jan 2006 19:48:54 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream binär speichern ios::binary on Tue, 03 Jan 2006 20:02:50 GMT]]></title><description><![CDATA[<p>Benutz #include&lt;fstream&gt; anstatt der Variante mit h.<br />
Was ist ein AnsiString?</p>
<p>mfg.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/956062</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/956062</guid><dc:creator><![CDATA[joomoo]]></dc:creator><pubDate>Tue, 03 Jan 2006 20:02:50 GMT</pubDate></item><item><title><![CDATA[Reply to ofstream binär speichern ios::binary on Tue, 03 Jan 2006 20:02:46 GMT]]></title><description><![CDATA[<p>ja aber ohne dem &amp; hat der compiler mcih angezickt. das sit das problem!</p>
<p>wir hatten das auch mal inna schule und jetzt sind ferien und mein lehrer segelt amnordpol :roll: oder so!<br />
meinste ich soll das einfach nur verschlüsselt abspeichern? nagut<br />
scheint wohl das beste zu sein. ist kein problem - sowas kann ich <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f61b.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--face_with_tongue"
      title=":P"
      alt="😛"
    /></p>
<p>danke</p>
<p>tim</p>
]]></description><link>https://www.c-plusplus.net/forum/post/956063</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/956063</guid><dc:creator><![CDATA[dern00b]]></dc:creator><pubDate>Tue, 03 Jan 2006 20:02:46 GMT</pubDate></item></channel></rss>