【发布时间】:2010-09-16 13:54:26
【问题描述】:
我不明白为什么
struct e{
void * a;
void * b[];
}
有 sizeof(e) == 4 而
struct f{
void * a;
void * b;
}
有 sizeof(f) == 8。
【问题讨论】:
-
一个discussion of the legality of the "struct hack" in ansi c。在 So 上搜索“struct hack”目前并没有引起太大的兴趣,但这就是您正在寻找的短语。