在C,柔性阵列构件的语法如下: struct s
{
int n;
double d[]; // flexible array member
};
而且,零尺寸数组中C.非法 如果我声明阵列是这样的: struct s
{
double d[0]; // Zero size array
};
GCC给出警告: warning: ISO C forbid
我有一个包含原始字段(int,uint8,...)和指针的结构。 这些指针通常指向一个不同结构类型的数组,以保持深度嵌套结构。 例如,在C: struct A
{
int field1;
int field2;
struct B *fields3;
unsigned int countofb;
}
struct B
{
int anotherfield1;
i