| | Basic facilities - slide 43 : 46 |
Physical program organization
The physical program organization is done by means of source files
- Source file organization of C++ programs
- Source files with #include directives
- A translation units is the result of preprocessing a source file
- .h files and .cpp files
- The .cpp file includes its .h file.
- Separate compilation - and subsequent linking
- External linkage:
- A name that can be used in other translation units than the one where it is defined
- Internal linkage
- A name that only can be used in the translation unit where it is defined
- Declared as static in C programs and older C++ programs
- Use an unnamed namespace for internal linkage in C++ programs