|
-
Hi every body I know the Thread is very old but this problems occur and will occur a lot of more times.
The trick is this :
OFFSET=0;
RA=0;
fread(&RA,sizeof(RA),1,arq_index);
fread(&OFFSET,sizeof(OFFSET),1,arq_index);
while (!feof(arq_index)){
printf("%s\n%s%ld\n%s%ld\n","------------------","RA : ",RA,OFFSET : ",OFFSET);
fread(&RA,sizeof(RA),1,arq_index);
fread(&OFFSET,sizeof(OFFSET),1,arq_index);
}
First of all never declare the variables in a loop, then You have to read the files before the while loop, then inside the loop do what ever You want, and in the end You have to read again the files. This is the correct way it works.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|