pUserFile = fopen(some file,"r"
while(!feof(pUserFile))
{
fread(&size,sizeof(size),1,pUserFile);
}
After reading the written item it loops once again and then finds EOF...why?????
The reason is because if your file is 10 chars in length and you read 10 chars you are not at the end of the file. When you try to read again the eof marker is read and you are now at the end of the file. I hope this helps.
TM
I don't know exactly what do theese functions do, but sometines hay happend the program to never find the end of file. In theese cases, you should do some workaround. John Fill
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.