<?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>Hi Leute!</p>
<p>Ich möchte mit einer MFC-Klasse eine Datei einlesen. Danach bearbeiten und in einer anderen Datei abspeichern.</p>
<p>Das klappt irgendwie nicht!!</p>
<p>CFile cFi;</p>
<p>cFi.open(datnam);<br />
cFi.read(datnam);</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/5769/cfile</link><generator>RSS for Node</generator><lastBuildDate>Sun, 12 Apr 2026 17:06:06 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/5769.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 May 2003 21:51:00 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to CFile on Sun, 11 May 2003 21:51:00 GMT]]></title><description><![CDATA[<p>Hi Leute!</p>
<p>Ich möchte mit einer MFC-Klasse eine Datei einlesen. Danach bearbeiten und in einer anderen Datei abspeichern.</p>
<p>Das klappt irgendwie nicht!!</p>
<p>CFile cFi;</p>
<p>cFi.open(datnam);<br />
cFi.read(datnam);</p>
]]></description><link>https://www.c-plusplus.net/forum/post/28058</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/28058</guid><dc:creator><![CDATA[SasC++]]></dc:creator><pubDate>Sun, 11 May 2003 21:51:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Mon, 12 May 2003 02:23:00 GMT]]></title><description><![CDATA[<p>Versuch es mal so :</p>
<pre><code class="language-cpp">CString PathName = &quot;C:\\ordner\\datei.end&quot;;  //Kann man auch aus einen Standart-                                               Öffnendialog erhalten
CFile* LoadFile = new CFile;
LoadFile-&gt;Open(PathName,CFile::modeRead);    //Datei zum lesen öffnen

char pbuf[100];
UINT nBytesRead = LoadFile.Read( pbuf, 100 );//100 Zeichen in den Puffer nehmen
LoadFile-&gt;Close();

//irgendeine Verarbeitung

PathName = &quot;C:\\andererordner\\anderedatei.end&quot;;
CFile* StoreFile = new CFile;
StoreFile-&gt;Open(PathName,CFile::modeCreate | CFile::modeWrite);
StoreFile.Write( pbuf, 100 );
StoreFile-&gt;Close();
</code></pre>
<p>Zum Lesen und schreiben gibt es auch andere Methoden schau einfach mal in die MSDN.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/28059</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/28059</guid><dc:creator><![CDATA[lordrin]]></dc:creator><pubDate>Mon, 12 May 2003 02:23:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Mon, 12 May 2003 05:44:00 GMT]]></title><description><![CDATA[<blockquote>
<p>Original erstellt von &lt;lordrin&gt;:<br />
<strong>schau einfach mal in die MSDN.</strong></p>
</blockquote>
<p>Exakt! Wenn du das gemacht hättest, dann hättest du deine Fehler sofort gesehen!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/28060</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/28060</guid><dc:creator><![CDATA[dEUs]]></dc:creator><pubDate>Mon, 12 May 2003 05:44:00 GMT</pubDate></item><item><title><![CDATA[Reply to CFile on Tue, 13 May 2003 18:50:00 GMT]]></title><description><![CDATA[<p><a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/963">@dEUs</a></p>
<p>nun jammer nicht wegen der 2 Pünktchen! :p<br />
Es muß natürlich heißen :</p>
<pre><code class="language-cpp">UINT nBytesRead = LoadFile-&gt;Read( pbuf, 100);
</code></pre>
<p>und</p>
<pre><code class="language-cpp">StoreFile-&gt;Open(PathName,CFile::modeCreate | CFile::modeWrite);
</code></pre>
<p>das hat ich dann davon wenn ich mal was einfach so aus dem Kopf tippe. Aber hast ja recht ist ein dämlicher Fehler.</p>
<p>Gruß Lordrin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/28061</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/28061</guid><dc:creator><![CDATA[lordrin]]></dc:creator><pubDate>Tue, 13 May 2003 18:50:00 GMT</pubDate></item></channel></rss>