© Ivor Horton and Peter Van Weert 2018
Ivor Horton and Peter Van WeertBeginning C++17https://doi.org/10.1007/978-1-4842-3366-5_10

10. Program Files and Preprocessing Directives

Ivor Horton1  and Peter Van Weert2
(1)
Stratford-upon-Avon, Warwickshire, UK
(2)
Kessel-Lo, Belgium
 

This chapter is more about managing code than writing code. We’ll discuss how multiple program files and header files interact and how you manage and control their contents. The material in this chapter has implications for how you define your data types, which you’ll learn about starting in the next chapter.

In this chapter, you will learn:
  • How header files and source files interrelate

  • What a translation unit is

  • What linkage is and why it is important

  • More about how you use namespaces ...

Get Beginning C++17: From Novice to Professional now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.