Lecture 4 Flashcards
1
Q
Declaring vs defining
A
Declaring establishes the item’s type and name: “function x exists”
Defining establishes the item’s purpose “this is what function X does”
Compiler error will result if you try to use something undefined
2
Q
Header and source files
A
Header files (.h) contain relevant declarations
Source files (.cpp or .c in C) contain code definitions
Source and header files then #include other header files with needed definitions.
3
Q
Using C++ resources
A
Uses #include and
Less extensive than Java’s resources
Very common inputs: and