E
ericunfuk
Hi,
In my program, I'm trying to seek forwards and backwards in a file
using fseek(),and use fread() to read a chunck of the file and send
that chunk off. I needed to send the file in chunks and sometimes I
need to resend some chunks if they get lost on their way, so I use
fseek() to seek back to the chunk that was lost and resend. But I
can't detect the EOF indicator as fseek() cleared it?So is there a way
I could check EOF has been reached or will be reached? I tried feof()
but I found that it's the worng thing to try, as it only tells you
"after" your attempt to move beyond EOF which may already been removed
by feek() in my case as well.
Thanks for any help you could provide.
Eric
In my program, I'm trying to seek forwards and backwards in a file
using fseek(),and use fread() to read a chunck of the file and send
that chunk off. I needed to send the file in chunks and sometimes I
need to resend some chunks if they get lost on their way, so I use
fseek() to seek back to the chunk that was lost and resend. But I
can't detect the EOF indicator as fseek() cleared it?So is there a way
I could check EOF has been reached or will be reached? I tried feof()
but I found that it's the worng thing to try, as it only tells you
"after" your attempt to move beyond EOF which may already been removed
by feek() in my case as well.
Thanks for any help you could provide.
Eric