confuse about how that works, here, i would try to make it very clear,
why?? what was wrong there? what does the compiler mean by that? and why does the poitner version works?Code:// file 2
CLASS B
{
...
};
// file 1
CLASSB b; // forward declaration
CLASS A
{
...
B b; // error
};
but...,
// file 1
CLASS A
{
...
B * b; // okey
};
so what i did is,
// file 1
CLASS B
{
...
};
CLASS A
{
...
B b; // now okey
};
many thanks! :)