Lesson 1: More About References, and Pointers
With pointers and the heap, we can build more complex classes.
In this lesson, we'll see how we can build things that feel like they're “built-in”.
Along the way, we'll see a few more details of how C++ works.
And get plenty of practice with memory diagrams, classes, pointers, references, and defining our own operators.
This lesson gives you more practice in some of the Group 4 (references & pointers) and Group 5 (object lifetime) learning goals, as well as laying the groundwork for the upcoming topic of iterators from Group 6 (interators).
Some of the topics here won't explicitly be on proficiency checks, but will be part of the background of C++ competencies that later checks will rely on.
Outline
- Before You Start…
- Memory Model Practice — Passing Copies
- Memory Model Practice — Passing References
- Discovering Temporaries
This might be a good spot for a quick break!
- How Functions Return Result Values
- Functions Can Return References
- When to Return References (and When Not To)
We change gears a bit here, so another good spot to come up for air.
Another good spot for a breather.
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.)