青青草破解版视频在线:请教struct 定义的问题

来源:百度文库 编辑:高校问答 时间:2024/05/09 10:14:50
例如:
struct str {
int dev:7,goo:5;
int len;
};
我不明白int dev:7,goo:5;表示什么意思?

这是位操作,dev为7bit整数(-64~63),goo为5bit整数(-16~15)。这种使用是为了节省内存空间。