Week 9 - Defining Types (Enums, Typedef, and Structs)

Learning objectives

Upon finishing this learning module, you should be able to:

  • Design and write code using multidimensional arrays
  • Use structs to represent heterogeneous collections of data

Day 1

Day 2

Day 3

Day 4

  • Holiday
This week we are hitting some topics that are not covered in the regular part of the book. It is more important than usual that you check out the code samples from the files area in elearn

Structs

Read learncpp.com's struct page

These videos cover structs and introduce some concepts that are not covered in the reading. This first one should be enough to prepare you for the CPP Lab.

Do the Structs CPP Lab .

Then watch this quick video about how to use structs across multiple files:

Structs and Arrays

This video demonstrates managing more complex data by combining structs and arrays. It will help get you ready for the last assignment.

Enums

Read about enumerations in Appendix G of the textbook. This video covers the key ideas:

Do the Enums CPP Lab .

Typedef & Namespaces

These are topics you should know about and recognize, but will not be using frequently. Don't worry about mastery, just make sure you understand these tools when you see them.

This video covers the core ideas:

Our book doesn't have great coverage, but you can use Learncpp.com as a reference to skim for more info: Typedef page and Namespaces page