Topics
Code from lecture
Intro to lab05
Pointers and structs
- Declaring structs
- Different ways of accessing member variables of a structs
- Pointers to structs, why and when to use them?
- Passing structs to functions by value, by reference and by address
- Pointer pitfalls
C++ References
- Creating aliases with references
- Differences between references and pointers
- Constant pointers and references, when and why to use them
Mechanics of function calls with specific attention to call by reference
- Program layout: text, data, bss, stack and heap
- References as function formal arguments
- More on the run-time stack