I'm trying to read a file and to work on the last byte a little differently. Here is my code:
FILE * file = fopen(path,"rb");
unsigned char curr;
while (fread(&in, 1, 1, file) >= 1)
{
If (Is_Last_Byte){
//Does something
}
else{
//Does something else
}
}
How do I perform this check? Is it possible to set a pointer to the last byte and during each loop iteration perform this check?
Thanks in advance.