曲径通幽论坛

 找回密码
 立即注册
搜索
12
返回列表 发新帖
楼主: beyes
打印 上一主题 下一主题

测试编辑器代码选择

[复制链接]

4918

主题

5880

帖子

3万

积分

GROAD

曲径通幽,安觅芳踪。

Rank: 6Rank: 6

积分
34387
11#
 楼主| 发表于 2011-3-6 23:23:24 | 只看该作者
[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); 
}
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

小黑屋|手机版|Archiver|曲径通幽 ( 琼ICP备11001422号-1|公安备案:46900502000207 )

GMT+8, 2024-5-29 08:26 , Processed in 0.074138 second(s), 20 queries .

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表