不知道这是什么原因?
typedef struct FbkItem{
char ff_state;
char ff_ftype[4]; /* file type */
char ff_attrib; /* attribute found */
short int iftime;
short int ifdate;
long ff_fsize; /* file size */
char ff_name[13]; /* found file name */
struct FbkItem *prev_item;
struct FbkItem *next_item;
}FbkItem;
这个结构体的大小在DOS下经过计算是35个字节,但是在xp下,计算怎么是40个字节啊?
经过分析,发现long这里多占用了2个字节,不知道为什么?而且奇怪的是一样的结构,在我的另外一个程序里(VC),发现其大小是36个字节。
莫名其妙啊,哪位高手,看看问题在哪里。