Hello,
I read a simple bmp-file with this loop:
while ( !feof(fp) ) {
printf("%x\n", fgetc(fp));
}
fclose(fp);
Everything seems to be correct, but at the end of the file, I get a weird
"ffffffff" output. How does this come? Actually the loop must have been
finished before printf can print some data, or when will the file
pointer increased in this case?
Thanks,
Markus
I read a simple bmp-file with this loop:
while ( !feof(fp) ) {
printf("%x\n", fgetc(fp));
}
fclose(fp);
Everything seems to be correct, but at the end of the file, I get a weird
"ffffffff" output. How does this come? Actually the loop must have been
finished before printf can print some data, or when will the file
pointer increased in this case?
Thanks,
Markus
Comment