2+2+14+4=24??不相信的进来看
#include<stdio.h>
typedef struct
{
short unsigned dataIcon;
short unsigned dataNum;
char empty[14];
long dataDate;
}DAILYITEM;
main()
{ printf("%d=%d+%d+%d+%d\n",sizeof(DAILYITEM),
sizeof(short unsigned),
sizeof(short unsigned),
sizeof(char)*14,
sizeof(long));
return 0;
}
编译器 VC6 输出:
24=2+2+14+4
Press any key to continue