|
|
|
|
|
by 1718627440
301 days ago
|
|
Note that you only need to cast for an upcast. To access the first member, you wouldn't need to cast. It would be nice though, if syntax like the following would be supported: struct A
{
int a;
};
struct B
{
int b;
struct A a;
};
void foo (struct A * a)
{
struct B * b;
&b->a = pa;
}
struct B b;
foo (&b.a);
|
|