Fread() Returning Zero Bytes Read: I Don't Understand Why?

You moved to the end of the file with fseek and then you're trying to read from it - but, since you are already at the end of the fail, the read fails because there's nothing left to read.

You moved to the end of the file with fseek, and then you're trying to read from it - but, since you are already at the end of the fail, the read fails because there's nothing left to read. Before attempting the read, get back to the beginning of file with another fseek: fseek(fp, 0L, SEEK_SET); or, even simpler, with a rewind: rewind(fp).

You're calling fseek to find the end of the file, this moves the position indicator to the end of the file, so when you call fread there's no data left to read. You need to use fseek to return to the start of the file before attempting to read the data from it.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions