Previous Lecture | lect05 | Next Lecture |
Code from lecture
https://github.com/ucsb-cs24-w19-mirza/cs24-w19-lectures/tree/master/lec-05
Topics
Review
Lesson plan
- Review C-style implementation of linked list from CS16
- Creating a list
- Iterating through a list
- Modifying a list (appending elements to the end)
-
Review Pointers (pointers to basic types and pointers to structs) and Dynamic memory allocation (new and delete) with use cases
-
Linked lists as an ADT (implementation using classes)
- Revisit the big four for linked list
C++ provides a default constructor, destructor, copy constructor, copy assignment operator for any class that doesn’t have one explicitly defined.