Read the bytes separately and put them in the right places in the int:
int value = 0; unsigned char byte1 = fgetc(ID3file); unsigned char byte2 = fgetc(ID3file); unsigned char byte3 = fgetc(ID3file); value = (byte1 << 16) | (byte2 << 8) | byte3;
Edit: It looks like ID3 uses a network (byte) byte order - a modified code to match.
source share