<?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[CFile]]></title><description><![CDATA[<p>hab ein problem mit cfile</p>
<p>will eine datei in einen string einlesen<br />
aber was muss ich b ei read als ersten und zweiten parameter angeben?!?</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/157177/cfile</link><generator>RSS for Node</generator><lastBuildDate>Sun, 26 Jul 2026 22:02:07 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/157177.rss" rel="self" type="application/rss+xml"/><pubDate>Wed, 23 Aug 2006 17:53:42 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CFile on Wed, 23 Aug 2006 17:53:42 GMT]]></title><description><![CDATA[<p>hab ein problem mit cfile</p>
<p>will eine datei in einen string einlesen<br />
aber was muss ich b ei read als ersten und zweiten parameter angeben?!?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123097</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123097</guid><dc:creator><![CDATA[N°°B]]></dc:creator><pubDate>Wed, 23 Aug 2006 17:53:42 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Wed, 23 Aug 2006 18:04:28 GMT]]></title><description><![CDATA[<p>Die MSDN als Freund und Helfer.</p>
<p>MSDN schrieb:</p>
<blockquote>
<p>Reads data into a buffer from the file associated with the CFile object.</p>
<pre><code class="language-cpp">virtual UINT Read(
   void* lpBuf,
   UINT nCount 
);
</code></pre>
<ul>
<li><strong>lpBuf</strong><br />
Pointer to the user-supplied buffer that is to receive the data read from the file.</li>
<li><strong>nCount</strong><br />
The maximum number of bytes to be read from the file. For text-mode files, carriage return–linefeed pairs are counted as single characters.</li>
</ul>
</blockquote>
<p>Was gibt es daran nicht zu verstehen?<br />
Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123107</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123107</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Wed, 23 Aug 2006 18:04:28 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Wed, 23 Aug 2006 18:24:03 GMT]]></title><description><![CDATA[<p>OK hab ich übersehen^^</p>
<p>aber wenn ich jetzt wieder write mache und will zeilen umbruch einfügen<br />
kommt nichts</p>
<p>ist was am code falsch?</p>
<pre><code>strBreak.Format(&quot;\n&quot;);
file.Write(strBreak.GetBuffer(0), strBreak.GetLength());
</code></pre>
]]></description><link>https://www.c-plusplus.net/forum/post/1123119</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123119</guid><dc:creator><![CDATA[N°°B]]></dc:creator><pubDate>Wed, 23 Aug 2006 18:24:03 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Wed, 23 Aug 2006 18:41:15 GMT]]></title><description><![CDATA[<p>keine antwort?</p>
<p><img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f615.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--confused_face"
      title=":confused:"
      alt="😕"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123142</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123142</guid><dc:creator><![CDATA[N°°B]]></dc:creator><pubDate>Wed, 23 Aug 2006 18:41:15 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Wed, 23 Aug 2006 21:54:28 GMT]]></title><description><![CDATA[<p>Sei mal nicht so ungeduldig. Wir haben alle hier (obwohl es sehr unglaublich klingt) ein Real Life (auch RL genannt ^^) ... Das Leben ausserhalb der Graphikkarte. Bzw. das Leben mit der besten Graphikkarte der Welt. Dafür mit der schlechtesten Engine, hat nicht mal eine Save und Load Funktion ... äh ja wo waren wir? <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f603.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--grinning_face_with_big_eyes"
      title=":D"
      alt="😃"
    /></p>
<p>Was heisst kommt nichts? Wo kommt nichts, was kommt nicht?<br />
Vielfach wird für eine richtige neue Zeile ein \r\n verlangt, bzw. vor allem bei Windows. Bei Windows oder noch besser Microsoft bedeutet ein \n eigentlich nur eine Neue Zeile und das kann dann auch nur ein Zeileneinschub sein. \r\n dagegen ist eine wirkliche neue Zeile.</p>
<p>Zudem verlangt GetBuffer die Minimumlänge des Strings. Wenn du 0 übergibst, wird es auch bei 0 bleiben. Wenn du daher alles im String willst, nimm einfach die Funktion GetBuffer (ohne Parameter).<br />
Zum schreiben kann man übrigens auch direkt das CString Objekt als Puffer angeben.</p>
<p>Wenn du allerdings lesbare Strings in eine Datei schreiben willst, dann empfehle ich dir CStdioFile. Sehr nützlich zum beschreiben von z.b. *.txt Dateien.</p>
<p>Wenn du Daten nur Zusammenpacken willst, dann würde ich dir empfehlen mal CArchive in der MSDN anzuschauen.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123270</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123270</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Wed, 23 Aug 2006 21:54:28 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Thu, 24 Aug 2006 13:37:33 GMT]]></title><description><![CDATA[<p>Du scheint keine aktuelle MFC Version zu nutzen... d.h. muss es</p>
<pre><code class="language-cpp">file.Write(strBreak.GetBuffer(strBreak.GetLenght()), strBreak.GetLength());
</code></pre>
<p>Heißen...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1123812</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1123812</guid><dc:creator><![CDATA[*D*Evil]]></dc:creator><pubDate>Thu, 24 Aug 2006 13:37:33 GMT</pubDate></item></channel></rss>