Previous Lecture lect16 Next Lecture

lect16, Tue 03/12

Using the C++ STL: array, vector list

Lab09 is just for practice, graded for participation

Notes:

Pass ll->head as value or reference? What’s the difference? ll->head will be copied if passed by reference, and will never be changed ll–>head will be added a reference to and change if passed by reference. This is necessary when deleting nodes, since you might have to repoint the head accordingly.

Notes on pointers:

Identifying a Linked List:

Q: What is mutable within a function?

Quiz Today: Given node and linked list structs, write functions to insert a node to the start and end of the list

The C++ Standard Template Library (STL)