|
From: Tor L. <tm...@ik...> - 2009-08-13 19:12:28
|
> I have a question about reading binary files(1.4gb in size) through fopen() > and fread(). The binary files I have originated from a Linux environment > and I can't read them as is. Why not? What kind of errors do you get? You do open the files in binary mode (fopen(filename, "rb")) I hope? In what way did you copy the files to your Windows machine? Is it possible they got corrupted already in the copying process? > I thought something was wrong w/ my fread or > the file size. However, when I run the head command from Msys to get all > the lines out to a temp file or use cat, then I can read the file fine. You say the files are binary, still you talk about "lines" which of course is a concept relevant to text files only. Also the "head" command is meaningful for text files only. Please explain more what kind of data the files contain. --tml |