<?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[FILE fread]]></title><description><![CDATA[<p>hi... es geht um</p>
<pre><code>FILE *stream_in;
	stream_in = fopen(infile, &quot;rb+&quot;);

	char buffer[BLOCKSIZE];
	int INDEX = 0;
	int BYTES = 0;

	while(!feof(stream_in) &amp;&amp; !ferror(stream_in))
	{ INDEX = 0;
	  for(SECTOR = 0; SECTOR &lt;= 7; SECTOR++) {
	  for(int i = 0; i&lt;= BLOCKSIZE - 1; i++)
	     buffer[i] = 0x00;

	fread(buffer, 1, BLOCKSIZE - 1, stream_in);

	for(Z = 0; Z &lt;= 3; Z++) {
	for(Y = 0; Y &lt;= 3; Y++) {
	for(X = 0; X &lt;= 3; X++) {
	  cube[SECTOR][Z][Y][X] = buffer[INDEX];

	  if(buffer[INDEX] == EOF) {
	     buffer[INDEX] = 0x00;
	     FILE_EOF = true; }

	  INDEX += 1;
	  BYTES += 1; } } }

	  }
   }
</code></pre>
<p>findet einer meinen Fehler?? weil... wenn ich es ausführe stürzt das program gleich am anfang ab...</p>
<p>danke...</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/270479/file-fread</link><generator>RSS for Node</generator><lastBuildDate>Sun, 30 Aug 2026 09:20:21 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/270479.rss" rel="self" type="application/rss+xml"/><pubDate>Tue, 13 Jul 2010 13:42:33 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to FILE fread on Tue, 13 Jul 2010 13:42:33 GMT]]></title><description><![CDATA[<p>hi... es geht um</p>
<pre><code>FILE *stream_in;
	stream_in = fopen(infile, &quot;rb+&quot;);

	char buffer[BLOCKSIZE];
	int INDEX = 0;
	int BYTES = 0;

	while(!feof(stream_in) &amp;&amp; !ferror(stream_in))
	{ INDEX = 0;
	  for(SECTOR = 0; SECTOR &lt;= 7; SECTOR++) {
	  for(int i = 0; i&lt;= BLOCKSIZE - 1; i++)
	     buffer[i] = 0x00;

	fread(buffer, 1, BLOCKSIZE - 1, stream_in);

	for(Z = 0; Z &lt;= 3; Z++) {
	for(Y = 0; Y &lt;= 3; Y++) {
	for(X = 0; X &lt;= 3; X++) {
	  cube[SECTOR][Z][Y][X] = buffer[INDEX];

	  if(buffer[INDEX] == EOF) {
	     buffer[INDEX] = 0x00;
	     FILE_EOF = true; }

	  INDEX += 1;
	  BYTES += 1; } } }

	  }
   }
</code></pre>
<p>findet einer meinen Fehler?? weil... wenn ich es ausführe stürzt das program gleich am anfang ab...</p>
<p>danke...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1925604</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1925604</guid><dc:creator><![CDATA[eri2asd]]></dc:creator><pubDate>Tue, 13 Jul 2010 13:42:33 GMT</pubDate></item><item><title><![CDATA[Reply to FILE fread on Tue, 13 Jul 2010 13:47:25 GMT]]></title><description><![CDATA[<p>Dann zeig mal mehr Code und gib mehr Informationen. Was ist zum Beispiel BLOCKSIZE? Und gibt es eine Fehlermeldung?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1925610</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1925610</guid><dc:creator><![CDATA[SeppJ]]></dc:creator><pubDate>Tue, 13 Jul 2010 13:47:25 GMT</pubDate></item><item><title><![CDATA[Reply to FILE fread on Tue, 13 Jul 2010 13:50:08 GMT]]></title><description><![CDATA[<p>Das gehört ins C-Forum.</p>
<blockquote>
<p>wenn ich es ausführe stürzt das program gleich am anfang ab...</p>
</blockquote>
<p>Zeile? Grund (SIGSEGV o. sonstiges)?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1925614</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1925614</guid><dc:creator><![CDATA[Athar]]></dc:creator><pubDate>Tue, 13 Jul 2010 13:50:08 GMT</pubDate></item><item><title><![CDATA[Reply to FILE fread on Tue, 13 Jul 2010 14:00:56 GMT]]></title><description><![CDATA[<p>eri2asd schrieb:</p>
<blockquote>
<p>hi... es geht um</p>
<pre><code>FILE *stream_in;
	stream_in = fopen(infile, &quot;rb+&quot;);
	
	char buffer[BLOCKSIZE];
	int INDEX = 0;
	int BYTES = 0;
	
	while(!feof(stream_in) &amp;&amp; !ferror(stream_in))
	{ INDEX = 0;

...	
	  }
   }
</code></pre>
<p>findet einer meinen Fehler?? weil... wenn ich es ausführe stürzt das program gleich am anfang ab...</p>
<p>danke...</p>
</blockquote>
<p>Hallo,</p>
<p>wenn Du zu faul bist, deinen Code ordentlich zu formatieren, du es nicht für nötig hälst, den Rückgabewert von fopen zu prüfen und auch nicht mitteilen kannst, wo genau Dein Programm abstürzt, dann verdienst Du es nicht, daß Deine Programme <strong>nicht</strong> abstürzen.</p>
<p>mfg Martin</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1925625</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1925625</guid><dc:creator><![CDATA[mgaeckler]]></dc:creator><pubDate>Tue, 13 Jul 2010 14:00:56 GMT</pubDate></item></channel></rss>