Forward declarations can only be used for reference or pointers because if you write( say there is a class called myClass)
class OtherClass
{
myClass A;
}
then the compiler needs to know the correct size of myClass to be able to correctly compiler OtherClass, but
class OtherClass
{
myClass* A;
}
or
class OtherClass
{
myClass& B;
}
Then, it does not need to know the full size of myClass, because they are declared as pointers and pointers have a known size.
I do not think I have been clear enough, but that''s life!