You indicated in the Point declaration that it is great for declaring a pointer or reference, but not for anything else in which the compiler needs to know the definition of the declared class.
If you need a forward declaration in the header file (right, just #include "Point.h" in Line.h ), then implement your Line functions in the implementation file, which is #include Point.h .
source share