S
sunny
Hi All
why does forward declaration does not work in following code.
struct A;
struct B
{
struct A a;
// struct A *a // WORKS SINCE ITS POINTER
};
struct A
{
struct B b;
};
gives compiler error for incomplete type A. why does forward
declaration of Struct A solve this problem.
why does forward declaration does not work in following code.
struct A;
struct B
{
struct A a;
// struct A *a // WORKS SINCE ITS POINTER
};
struct A
{
struct B b;
};
gives compiler error for incomplete type A. why does forward
declaration of Struct A solve this problem.