Previous Lecture | lect03 | Next Lecture |
Code from lecture:
https://github.com/ucsb-cs24-w19-mirza/cs24-w19-lectures/tree/master/lec-03
Topics
The big four
- Constructor
- Default and parameterized constructors (Review)
- Initializing const member variables using initialization lists
- Destructor
- Copy-constructor
- Copy-assignment
Non member functions and friend functions
- If a non-member function is declared to be a friend of a class, it can access the private members of the class.
- Discuss when/why you might use friend functions
Makefiles
- We will split our implementation of the die Game from the previous class into three files - header file (contains only the class definition), source file (contains the implementation of the class methods - no main), test file - uses the ADT. (More practice on this in lab02)
- Write a simple Makefile to compile all the different programs written in class