need help with fread BIG probs 
Author Message
 need help with fread BIG probs

>i have to read an opened file in pure ANSI C (with fread)
>But the data of the file that i must read is unsigned char, and it
>contains ALL bytes ... from 0 to 255
>so, when i read, it stops because a eof is in the file (of course, coz
>all the bytes can be located in the file in all positions)
>But i need to continue reading, until the end of the file (physical end).
>How can i do that?

You don't specify the operating system.  I'm guessing that it is MSDOS,
where ASCII 26 decimal (CTRL-Z) means EOF.
If so, try opening the file with the mode "rb", where the 'b' part means
'binary', i.e., ignore special meanings of bytes.

Tue, 03 Sep 1996 13:02:21 GMT  
 [ 1 post ] 

 Relevant Pages 

1. fread, fwrite probs

2. Need fread() help

3. help needed fread'ing data into a buffer using Turbo C++ and huge model

4. Beginner:Needs help with fread()..

5. Need help with fopen/fread prob in W98 - PLEASE


7. Big Problem in C : Need an urgent help - projtmp.cpp (0/1)

8. Big Problem in C : Need an urgent help - projtmp.cpp (1/1)

9. fopen problem when allocating big matrices : need help

10. Need a big Help on this, please.....

11. string too big, urgent help needed !

12. Help making a really big array needed


Powered by phpBB® Forum Software