![]() |
![]() |
3406 | ![]() |
||||
![]() | |||||||
| Declarations and definitions | |||||||
An object or function with external linkage has been defined inside an include file. Header files usually contain macro definitions and declarations of typedefs, tags, objects and functions with external linkage. Conventionally, a header file is included in multiple translation units because its primary function is to provide a way of using such items throughout a project without code duplication. An object or function with external linkage should be defined in one translation unit only. It follows that such definitions should not be present in a header file except in the unusual situation where the header file is to be included in just one translation unit.
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |