Synopsis: | Don't put definitions in header files |
Language: | C++ |
Severity Level: | 5 |
Category: | Code Organization |
Description: |
Header files are meant as an interface. Definitions are about the implementation of a language entity. The way something is implemented should not be revealed to the outside world. Header files serve both as an easy-to-study interface as well as being open to straight-forward re-implementation. Exceptions to this rule are constants, enumeration and template definitions. |