ftell error after the first call to fread

后端 未结 2 1346
后悔当初
后悔当初 2021-01-23 18:07

So I have a very simple program that reads the 3 first bytes of a file:

int main(void)

{

    FILE *fd = NULL;
    int i;
    unsigned char test = 0;
    fd = fopen(         


        
2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-23 18:49

    Please look at this question Reading bytes from bmp file.

    Looks like problem is in the mode of opening it.

提交回复
热议问题