这个大小怎么计算的
这个大小如何计算的
(1)
typedef struct _nfruit
{
unsigned int plum:5;
unsigned int peach:27;
} nf;
是24
typedef struct _nfruit
{
unsigned int plum:5;
char c;
unsigned int peach:27;
} nf;
这个 又是多少
------解决方案--------------------
结构体是用加的,联合才有位域对齐哦,不知道对不对,加关注
(1)
typedef struct _nfruit
{
unsigned int plum:5;
unsigned int peach:27;
} nf;
是24
typedef struct _nfruit
{
unsigned int plum:5;
char c;
unsigned int peach:27;
} nf;
这个 又是多少
------解决方案--------------------
结构体是用加的,联合才有位域对齐哦,不知道对不对,加关注