$\require{cancel}$
A simple Linked List Class
- Let's not build a templated class yet.
- We can use the trick from before with a using statement.
- What operations do we wish to support?
- PushFront, PopFront?
- Size
- An internal "pointer"
- Home - moves to first position
- Next - moves to next position, no error when attempting to move past end.
- AtEnd - returns true if we are at the end of the list.
- Data - returns a reference to the data at the current position if there is any, exception otherwise.
- Eventually we will build an Iterator to do these actions for us.
- But that is just a bit tricky so let's put it off for now.
- Look at or implement SListT.h and SListT.cpp
- How about the big two we are missing?
- How about themove operators?