I have this C++ project that I'm working on
All classes have their implementation separated from the .h file.
However, I'm not certain why/when forward declarations are required.
For example, I just ran into an error when I #included "ClassType.h", the compiler completely refuses to compile a class that had a pointer to ClassType, even though class ClassType is clearly defined in "ClassType.h".
Why it isn't enough for the compiler to simply see that I've #included "ClassType.h", and WHY does it want a forward declaration?
#include "ClassType.h"
// REFUSES TO COMPILE WITHOUT forward declaration
class ClassType;
class SomeClass
{
ClassType* instance;
};