- 博客(1)
- 收藏
- 关注
转载 柔性数组
#include<stdio.h> typedef struct _SoftArray{ int len; int array[]; }SoftArray; int main() { int len = 10; printf("The struct's size is %d\n",sizeof(SoftArray)); } 我们可以看出,_SoftArray结构体的大小是4,显然,在32位操作系统下一个int型变量大小刚好为4,也就说结构体中的数组没有占用
2020-05-13 00:25:04
188
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人