【发布时间】:2010-02-16 16:44:34
【问题描述】:
当我尝试编译时,GCC 给了我一个“数组类型的元素类型不完整”的错误消息:
typedef struct _node node;
struct _node{
int foo;
node (*children)[2];
int bar;
};
在内存中结构应该是这样的
0x345345000000 foo
0x345345000004 pointer to 1. child node
0x345345000008 pointer to 2. child node
0x34534500000C bar
【问题讨论】:
标签: arrays gcc pointers struct typedef