Week 3, Lesson 2
Today we'll address learning goal
- Goal 4A (References): Read, write, and visualize C++ code involving references.
References allow us to give multiple names to the same piece of data, which will turn out to be a very powerful ability!
Outline
- Before You Start…
- Reference Types
- References Exercise 1
- References Exercise 2: Assigning to a Reference
- References Exercise 3: References to References?
(That was a bunch of exercises in a row, with more to come. Need a break?)
- Example: References as Function Parameters
- Warning: C++ Is Not Java
- References Exercise 4: Multiple "Return" Values
(How are you holding up? Maybe give yourself a moment to stretch.)
- const References
- References Exercise 5: Find the Compiler Errors
- Example: Why
const
References? - Key Points
- Before You Go…
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.)