In the following code:
class B;
struct A
{
B* b; // <- why MUST be a pointer? Why size cannot be calculated later...?
}
struct B
{
...
}
As far as I understand, struct A must define b as B*, as the compiler cannot tell the size of B when calculating size of A.
What I do not understand, is why the compiler cannot postpone the calculation until it does find the full definition of B (as it was promised by the programmer by forwarding declare the class)