<?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[ifstream vs ReadFile]]></title><description><![CDATA[<p>Hallo.<br />
Ich versuche zur Zeit, mir einen kleinen Texteditor zu schreiben, und bin bei der Ladefunktion.<br />
Sollte man da dann ifstream oder ReadFile verwenden,bzw was gibt es für Vor-und Nachteile?<br />
Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/173085/ifstream-vs-readfile</link><generator>RSS for Node</generator><lastBuildDate>Mon, 13 Jul 2026 11:11:18 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/173085.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 11 Feb 2007 19:13:36 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to ifstream vs ReadFile on Sun, 11 Feb 2007 19:13:36 GMT]]></title><description><![CDATA[<p>Hallo.<br />
Ich versuche zur Zeit, mir einen kleinen Texteditor zu schreiben, und bin bei der Ladefunktion.<br />
Sollte man da dann ifstream oder ReadFile verwenden,bzw was gibt es für Vor-und Nachteile?<br />
Thx</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227034</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227034</guid><dc:creator><![CDATA[Laden &#x2F; Speichern]]></dc:creator><pubDate>Sun, 11 Feb 2007 19:13:36 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream vs ReadFile on Sun, 11 Feb 2007 19:54:47 GMT]]></title><description><![CDATA[<p>ifstream ist buffered ReadFile lies direkt. Wenn Du die ganze Datei auf einen Schlag lesen willst ist ReadFile mit Sicherheit schneller. Wenn Du das ganze zeichenweise, zeilenweise parsen willst is ifstream leichter zu nutzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227057</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227057</guid><dc:creator><![CDATA[Martin Richter]]></dc:creator><pubDate>Sun, 11 Feb 2007 19:54:47 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream vs ReadFile on Sun, 11 Feb 2007 20:03:27 GMT]]></title><description><![CDATA[<p>Und <em>ifstream</em> ist Plattform unabhängig.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227061</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227061</guid><dc:creator><![CDATA[CodeFinder]]></dc:creator><pubDate>Sun, 11 Feb 2007 20:03:27 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream vs ReadFile on Mon, 12 Feb 2007 13:15:25 GMT]]></title><description><![CDATA[<p>Danke.<br />
Dann nehme ich jetzt dann ifstream,<br />
hab aber schon wieder ein Problem, denn wenn ich dann schreibe :</p>
<pre><code class="language-cpp">FileBuf = new char[FileLength];

IFile.seekg(0,std::ios::beg);
IFile.read(FileBuf,FileLength);

IFile.close();

FileText = FileBuf;
delete[] FileBuf;

SetWindowText(hEdit,FileText.c_str());
</code></pre>
<p>Dann wird der Text alles ohne Neuzeile dargestellt, Neuzeilen gibt es nur, wenn die Zeile zu Ende ist.<br />
Was mache ich da falsch?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227388</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227388</guid><dc:creator><![CDATA[Laden &#x2F; Speichern]]></dc:creator><pubDate>Mon, 12 Feb 2007 13:15:25 GMT</pubDate></item><item><title><![CDATA[Reply to ifstream vs ReadFile on Mon, 12 Feb 2007 16:15:40 GMT]]></title><description><![CDATA[<p>einen zeilenvorschub erreichst nur mit \r\n siehe <a href="http://de.wikipedia.org/wiki/Newline" rel="nofollow">http://de.wikipedia.org/wiki/Newline</a><br />
somit musst du dein string parsen und \n gegen \r\n ersetzen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1227523</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1227523</guid><dc:creator><![CDATA[miller_m]]></dc:creator><pubDate>Mon, 12 Feb 2007 16:15:40 GMT</pubDate></item></channel></rss>