Categories
October Surprise 2024

7.10 — Sharing global constants across multiple files (using …

This lesson discusses the most common ways to do this. Global constants as internal variables Prior to C++17, the following is the easiest and most common solution: Create a header file to hold these constants Inside this header file, define a namespace (discussed in lesson 7.2 — User-defined namespaces and the scope resolution operator)