摘要:
什么是柔性别数组 结构中的最后一个元素允许是未知大小的数组,这就叫做柔性数组成员 例如 typedef struct st_type { int i; int a[0]//柔性数组成员可以调整数组大小 }type_a; 使用方法 struct S { int n; int arr[]; }; int 阅读全文
posted @ 2021-04-15 16:00
紅人
阅读(100)
评论(0)
推荐(0)
摘要:
什么是位段 段位的声明的结构类似,有两个不同: 1.位段的成员必须是int,unsigned int 或者signed int只要是整形就可以. 2.位段的成员名后边有一个冒号和一个数字 例如 struct S { int a : 2; int b : 5; int c : 10; int d : 阅读全文
posted @ 2021-04-15 08:43
紅人
阅读(163)
评论(0)
推荐(0)

浙公网安备 33010602011771号