<?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[Problem mit FILE * oO&amp;quot;]]></title><description><![CDATA[<p>ich habe in meiner LZ77.h unteranderem folgendes:</p>
<pre><code class="language-cpp">FILE *infile;
FILE *outfile;

//...

void LZ77_EncodeFile(char *input, char *output) {
  infile = fopen(input, &quot;rb&quot;);
  outfile = fopen(output, &quot;wb&quot;);

  setvbuf( infile, NULL, _IOFBF, 4096);
  setvbuf( outfile, NULL, _IOFBF, 4096);

  LZ77_Encode();

  fclose(infile);
  fclose(outfile);
}
//---------------------------------------------------------------------------

void LZ77_EncodeFileToStream(char *input, FILE *output) {
  infile = fopen(input, &quot;rb&quot;);
  outfile = output;

  setvbuf( infile, NULL, _IOFBF, 4096);
  setvbuf( outfile, NULL, _IOFBF, 4096);

  LZ77_Encode();

  fclose(infile);
}
</code></pre>
<p>Nun mach ich folgendes:</p>
<pre><code class="language-cpp">LZ77_EncodeFile(&quot;brick.bmp&quot;, &quot;brick.lzf&quot;);
//Könnte ich auch öfters hier machen, brick.lzf währe immer gleich!

FILE *ff = fopen(&quot;brick2.lzf&quot;, &quot;wb&quot;);
LZ77_EncodeFileToStream(&quot;brick.bmp&quot;, ff);
fclose(ff);
//Mach ich diesen Pack öfters währe die brick2.lzf immer gleich.
</code></pre>
<p>Wenn ich wollte könnte ich die Reihenfolge hier auch ändern, trotzdem folgendes Problem:</p>
<p>Jedoch sind beide lzf Dateien total unterschiedlich. Unter Borland C++ lief alles bestens, mit Visual C++ nicht. Kann mir wer nen Tipp geben woran das liegen könnte?</p>
<p>MfG<br />
Benjamin</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/46692/problem-mit-file-oo-quot</link><generator>RSS for Node</generator><lastBuildDate>Mon, 27 Apr 2026 05:21:20 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/46692.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 21 Aug 2003 22:17:44 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Problem mit FILE * oO&amp;quot; on Thu, 21 Aug 2003 22:17:44 GMT]]></title><description><![CDATA[<p>ich habe in meiner LZ77.h unteranderem folgendes:</p>
<pre><code class="language-cpp">FILE *infile;
FILE *outfile;

//...

void LZ77_EncodeFile(char *input, char *output) {
  infile = fopen(input, &quot;rb&quot;);
  outfile = fopen(output, &quot;wb&quot;);

  setvbuf( infile, NULL, _IOFBF, 4096);
  setvbuf( outfile, NULL, _IOFBF, 4096);

  LZ77_Encode();

  fclose(infile);
  fclose(outfile);
}
//---------------------------------------------------------------------------

void LZ77_EncodeFileToStream(char *input, FILE *output) {
  infile = fopen(input, &quot;rb&quot;);
  outfile = output;

  setvbuf( infile, NULL, _IOFBF, 4096);
  setvbuf( outfile, NULL, _IOFBF, 4096);

  LZ77_Encode();

  fclose(infile);
}
</code></pre>
<p>Nun mach ich folgendes:</p>
<pre><code class="language-cpp">LZ77_EncodeFile(&quot;brick.bmp&quot;, &quot;brick.lzf&quot;);
//Könnte ich auch öfters hier machen, brick.lzf währe immer gleich!

FILE *ff = fopen(&quot;brick2.lzf&quot;, &quot;wb&quot;);
LZ77_EncodeFileToStream(&quot;brick.bmp&quot;, ff);
fclose(ff);
//Mach ich diesen Pack öfters währe die brick2.lzf immer gleich.
</code></pre>
<p>Wenn ich wollte könnte ich die Reihenfolge hier auch ändern, trotzdem folgendes Problem:</p>
<p>Jedoch sind beide lzf Dateien total unterschiedlich. Unter Borland C++ lief alles bestens, mit Visual C++ nicht. Kann mir wer nen Tipp geben woran das liegen könnte?</p>
<p>MfG<br />
Benjamin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/338132</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/338132</guid><dc:creator><![CDATA[_ProfEich]]></dc:creator><pubDate>Thu, 21 Aug 2003 22:17:44 GMT</pubDate></item></channel></rss>