<?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[Dateien zusammenfügen]]></title><description><![CDATA[<p>ich erstelle aus drei datenteilen eine neue datei.<br />
der mittlere datenteil ist ca. 46MB gross und mit meiner<br />
derzeiten routine dauert das ca. 40 sek. bis die neue<br />
datei erstellt ist.</p>
<p>kann mir jemand sagen wie ich das optimieren kann?<br />
die daten werden einfach nacheinander weitergeschrieben.</p>
<pre><code>ifstream rFile;
ifstream hFile;
ifstream fFile;

ofstream nFile;

hFile.open(&quot;Datei1.dat&quot;, ios::in | ios::binary | ios::ate);

if(!hFile)
{

     return 1;
}

size = hFile.tellg();
hFile.seekg (0, ios::beg);
buffer = new char [size];
//datei auslesen
hFile.read (buffer, size);

nFile.open(target, std::fstream::out | std::fstream::binary | ios::ate);

//in neue datei schreiben
nFile.write (buffer, size);

// ... usw.
</code></pre>
<p>thx 4 help.</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/120660/dateien-zusammenfügen</link><generator>RSS for Node</generator><lastBuildDate>Sat, 22 Aug 2026 10:53:59 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/120660.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 15 Sep 2005 10:45:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Dateien zusammenfügen on Thu, 15 Sep 2005 10:45:30 GMT]]></title><description><![CDATA[<p>ich erstelle aus drei datenteilen eine neue datei.<br />
der mittlere datenteil ist ca. 46MB gross und mit meiner<br />
derzeiten routine dauert das ca. 40 sek. bis die neue<br />
datei erstellt ist.</p>
<p>kann mir jemand sagen wie ich das optimieren kann?<br />
die daten werden einfach nacheinander weitergeschrieben.</p>
<pre><code>ifstream rFile;
ifstream hFile;
ifstream fFile;

ofstream nFile;

hFile.open(&quot;Datei1.dat&quot;, ios::in | ios::binary | ios::ate);

if(!hFile)
{

     return 1;
}

size = hFile.tellg();
hFile.seekg (0, ios::beg);
buffer = new char [size];
//datei auslesen
hFile.read (buffer, size);

nFile.open(target, std::fstream::out | std::fstream::binary | ios::ate);

//in neue datei schreiben
nFile.write (buffer, size);

// ... usw.
</code></pre>
<p>thx 4 help.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/872670</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/872670</guid><dc:creator><![CDATA[EvoSeven]]></dc:creator><pubDate>Thu, 15 Sep 2005 10:45:30 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien zusammenfügen on Thu, 15 Sep 2005 13:23:39 GMT]]></title><description><![CDATA[<p>oder kann mir jemand beantworten wie ich an den anfang einer datei<br />
etwas schreibe?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/872859</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/872859</guid><dc:creator><![CDATA[EvoSeven]]></dc:creator><pubDate>Thu, 15 Sep 2005 13:23:39 GMT</pubDate></item><item><title><![CDATA[Reply to Dateien zusammenfügen on Fri, 16 Sep 2005 06:25:23 GMT]]></title><description><![CDATA[<p>Dieser Thread wurde von Moderator/in <a href="http://www.c-plusplus.net/forum/profile.php?mode=viewprofile&amp;u=9713" rel="nofollow">estartu_de</a> aus dem Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=1" rel="nofollow">MFC (Visual C++)</a> in das Forum <a href="http://www.c-plusplus.net/forum/viewforum.php?f=15" rel="nofollow">C++</a> verschoben.</p>
<p>Im Zweifelsfall bitte auch folgende Hinweise beachten:<br />
<a href="http://www.c-plusplus.net/forum/viewtopic.php?t=39405" rel="nofollow">C/C++ Forum :: FAQ - Sonstiges :: Wohin mit meiner Frage?</a></p>
<p><em>Dieses Posting wurde automatisch erzeugt.</em></p>
]]></description><link>https://www.c-plusplus.net/forum/post/873351</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/873351</guid><dc:creator><![CDATA[C++ Forumbot]]></dc:creator><pubDate>Fri, 16 Sep 2005 06:25:23 GMT</pubDate></item></channel></rss>