The Structure of a C++ Program

Steven Zeil

Old Dominion University, Dept. of Computer Science

Table of Contents

1. Separate Compilation
1.1. Single File Programs
1.2. Multiple File C++ Programs
1.3. Separate Compilation
2. The # Preprocessor
2.1. #include
2.2. #define
2.3. #ifdef, #ifndef, #endif
3. Declarations and Definitions
3.1. General Rules for Decls & Defs
3.2. Decls&Defs: Variables
3.3. Decls&Defs: Functions
3.4. Decls&Defs: Data Types
4. Organizing Decls & Defs into Files
4.1. Header and Non-Header Source Files
4.2. Coupling and Cohesion
5. Example: the auction program
5.1. Dividing Things Up

Discuss This Page:

(no threads at this time)