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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Using C++ resources

A

Uses #include and

Less extensive than Java’s resources

Very common inputs: and

How well did you know this?
1
Not at all
2
3
4
5
Perfectly