If class headers are embedded into each other, then the headers used in the upper files are implicitly connected in the "lower" in the hierarchy file, so that they can be omitted separately. In addition, the "good style" (tm) dictates the need to get rid of the inclusions in headers (transferring them to * .cpp files), using forward declaration where this is possible. And this is possible in cases where a pointer to a class is used in the header file, without referring to its members (and other situations in which the size of the object is needed). Thus, we can minimize implicit inclusion (in some cases, redundant inclusion). Specific example:
//------------- // SomeType.h //------------- class OtherType; class SomeType { int i_; OtherType* ptr_; public: SomeType(int a, OtherType* pObj); void Action(OtherType* pObj); }; //------------- // SomeType.cpp //------------- #include "OtherType.h" SomeType::SomeType(int a, OtherType* pObj); : i_(a), ptr_(pObj) { } void SomeType::Action(OtherType* pObj) { ... }