If you use correctly enable guards , this should not be a problem. In particular, if you make sure that #include-in the same file is idempotent twice (-the #includesame header is twice the same as #include-th its once), this will not cause a problem. When classD.hincluded classB.h, it will include classA.h. Then, when he tries to turn it on classC.hand classC.htries to turn it on classA.h, nothing happens. This is beautiful because it classC.hcan see classA.h, because it is already on.
source
share