hi all,
I'm having trouble reading a long integer from a binary file. The long int is 4 bytes long.
i have, for example:
that didn't work so i tried:Code:byte_t bytes_read; long temp; bytes_read = fread(&temp, sizeof(long)*4, 1, filePtr);
that still doesn't workCode:byte_t bytes_read; long* temp; temp = (long*)malloc(sizeof(temp)); bytes_read = fread(temp, sizeof(long)*4, 1, filePtr);
any ideas? i think it's trivial but i can't wrap my head around it...thanks!



LinkBack URL
About LinkBacks



