14.2 — Introduction to classes

In the previous chapter, we covered structs (), and discussed how they are great for bundling multiple member variables into a single object that can be initialized and passed around as a unit. In other words, structs provide a convenient package for storing and moving related data values. Consider the …

12.13 — In and out parameters

A function and its caller communicate with each other via two mechanisms: parameters and return values. When a function is called, the caller provides arguments, which the function receives via its parameters. These arguments can be passed by value, reference, or address. Typically, we’ll pass arguments by value or by …