Week 3, Lesson 1
This lesson focuses on an important topic for scaling up our programs: multifile compilation. We will explore how to break up our code into multiple files.
It addresses the following Group 3 learning goals:
-
Goal 3A: Compilation Stages:
- Describe the stages of compilation and recognize common errors and their causes at various stages.
-
Goal 3B: Compilation Commands:
- Write compilation commands to compile a multifile program
- For the first time
- To recompile it recompile after a change (compiling only the files necessary).
- Write compilation commands to compile a multifile program
-
Goal 3C: Program Organization:
- Explain the division of code into header and source files.
- Use
#include
directives to ensure that declarations of variables, classes, functions, etc. are visible.
-
Goal 3D: Include Guards:
- Identify the problem that include guards address.
- Implement a valid include guard.
What's an include guard?
We'll get to it! Hold your horses!
Hay!
No, seriously—does anyone have some hay?
Outline
(Maybe take a stretch break if you want?)
#include
Directives- Header Files
- Another Problem
- Include Guards
- Should a Source File Include Its Own Header File?
(This is another good spot for a quick break!)
To receive credit: complete all pages above, then this page will be complete as well (and get a green check emoji at the bottom right of the page).
(When logged in, completion status appears here.)