int test;
char buf[]={0x00,0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a};
typedef struct {
char x1;
char x2;
char x3;
int x4;
int x5;
}IP;
IP *p;
main()
{
p=(IP *)&buf[0];
test=p->x4;//test 应该是0x0403,可实际test为0x0504,这是为什么?
//实际工作结构不能改变,能否通过编译开关设置使其正确。
}