I had a binary data file. The data was saved as sequence of 256 data of type "BYTE" and followed by extrabytes. The extrabytes data has structure as follows:
I was using VC++ 6.0 before when I got and saved the data, and I could read out all data coorectly before when I used Visual studio 6.0, now I am using VS2010, and I can not read out the extraBytes signal correctly, Why?
I know the size of the structure of OBJ_Signal_Extra_Bytes is 56 bytes, but when I use sizeof(extraBytes), it shows 64 bytes, what causes the difference?
First thing, check whether the endianess is different.
Second, apparently you're using a class that depends on the compiler for the time. The class may have changed in the next versions. Now you can't redo that extraction again. Saving object files that way is a bad idea.
All you can do now (of course, after ensuring that the endianess hasn't changed for your current computer) is read 56 bytes manually, and then interpret the parts 1 by 1. It appears to me that interpreting the last 4 words is possible (the last 48 bytes), but you can forget about reading that time object... I think it's impossible when you change the compiler.
If you still can get the old compiler, get it, extract the data, save it to some proper type (ascii or anything else, but not binary object stuff) and then read it again with the new compiler.