Week 9 - Vectors
Learning Objectives
Upon finishing this learning module, you should be able to:
- Use vectors to store collections of data
- Design functions that use common patterns to process vectors
Recommended Schedule
Day 1
- Get started on Vectors (Ch 13.1-13.6)
Day 2
- Continue working on Vectors (Ch 13.7-13.10)
- Work on Ch 13 Exercises 1
Day 3
- Finish reading about Vectors (Ch 13.11)
- Work on Ch 13 Exercises 2
- Check out the assignment
Day 4
Encouraged, but not required:
Vectors
Read Ch 13 on Vectors.
The first exercise set covers mostly 13.1-13.6, although the concepts in 13.9 (pass by value vs pass by reference for vectors) may also be helpful.
Exercise set 2 covers 13.7-13.10 and focus on loops that process vectors.
Check out this video about using the debugger with vectors:
These next videos are optional, but may help clarify some concepts.
This one reviews iterators and how they are used with erase and insert (13.6)
This one reviews passing looping strategies (13.7-13.8):
This one covers passing vectors to functions and the kinds of jobs we do with vectors (13.9-13.10):
Setting Up a Local Development Environment
If you are going on in CS, you will eventually need to have a local development environment set up. Now that you have some familiarity working with templates and tools, it is a good time to start experimenting with that.
If you are currently feeling overwhelmed, you should focus on other course work. But if you can carve out a little time, setting up a local environment now will free you up from relying on codespaces.
If you are not continuing on to CS162, the only reason to make a local development environment would be if it sounds interesting.
To get a local environment set up, follow these instructions: Local Development Setup