TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
C++ Coding Standard

Rule:  ORG#005

Synopsis:Each file shall directly include each header file upon which declarations it directly depends
Severity Level:3
Category:Code Organization


A file shall not depend on declarations that are only indirectly included by means of a nested #include directive in some other included header file. Otherwise, it would be unnecessarily difficult to change dependencies of a header file, even if it already was self-contained. It would also be somewhat less obvious which files are the actual users of specific headers.

Exception:an exception to this is the inclusion of "stdafx.h" in Visual Studio. In this header file a lot of files are combined to speed up the compilation process.