Skip to content

Including source VS including in header

TS van der Berg edited this page Oct 1, 2017 · 7 revisions

In the real world:

  • If possible, #include in source files, not in header (localize)
  • Header files only need includes that are used in the header file
  • Avoid namespaces

Read more

In this course, when using internal header (.ih) files

  • Feel free to use namespaces even in header file
  • #include everything in .ih
  • (only) include header file in every source

Read more

Clone this wiki locally