Lecture overview -- Keyboard shortcut: 'u'  Previous page: More namespaces -- Keyboard shortcut: 'p'  Next page: Example of program organization -- Keyboard shortcut: 'n'  Lecture notes - all slides and notes together  slide -- Keyboard shortcut: 't'  Help page about these notes  Alphabetic index  Course home  Lecture 2 - Page 39 : 42
Notes about C++
Basic facilities
Physical program organization

The physical program organization is done by means of source files

  • The C++ Programming Language: Page 197 - ...
 

  • 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

  • The C++ Programming Language: Page 199: External and internal linkage