[C++] 纯文本查看 复制代码 #include <stdio.h>
struct bitdef {
unsigned int a:1;
unsigned int b:3;
unsigned int c:4;
};
int main(void)
{
struct bitdef test = {0};
struct bitdef *p = &test;
printf ("bitdef size: %d\\n", sizeof(test));
return (0);
}#include <stdio.h>
struct bitdef {
unsigned int a:1;
unsigned int b:3;
unsigned int c:4;
};
int main(void)
{
struct bitdef test = {0};
struct bitdef *p = &test;
printf ("bitdef size: %d\\n", sizeof(test));
return (0);
} |