【发布时间】:2010-03-17 01:41:36
【问题描述】:
struct struct0 {
int a;
};
struct struct1 {
struct struct0 structure0;
int b;
} rho;
&rho->structure0; /* Reference 1 */
(struct struct0 *)rho; /* Reference 2 */
(struct struct0)rho; /* Reference 3 */
从参考文献 1 开始,编译器是取 rho 的地址,然后访问结构 0,还是反过来?
参考 2 处的行有什么作用?
既然结构0是结构1的第一个成员,那么引用3是否等同于引用1?
【问题讨论】: