|
Don't include Screen.h, Rectangle.h or iostream.h inside point.h
You also don't need to forward declare Rectangle inside point.h, as it doesn't use it.
Screen.h doesn't need to include Point.h, Rectangle.h or iostream.h, it just needs the forward declare of Point (or you could just leave the Point.h include in there, but you don't need the include and the forward declare).
Rectangle just needs to include Point.h and have the forward declare of Screen. All the other includes should be removed.
As a rule of thumb, the fewer nested includes you have the better. If the header doesn't need the include, then don't put it in the header.
|