Hi,
I need to read byte by byte data from header-like file. The format of the file is in the link, please take a look
http://imageshack.us/photo/my-images/96/tablefu.jpg/
I dont need the first 128bytes and I need to get the next 4 bytes. My code is like below:
char* icm_name = "Samsung_to_Cannon.icm";
char buf[5];
FILE* fp = fopen(icm_name, "rb");
fseek( fp, 128, SEEK_SET );
fread( buf, 1, 4, fp );
buf[4] = '\0';
printf("%s\n",buf);
fclose( fp );
But it returns nothing.. What is wrong with my code? Please give me some advices..
Thanks