This lab concerns the linked lists and dynamic memory allocation.
~cs253/Labs/LinkedListto a convenient place in your home directory.
Makefileso that you won't have to type
g++again. Use at least
this->, which are always suspicious. Remove them. Does everything still work?
.initialize()methods often indicate that the author doesn't understand constructors. Turn them into ctors.
.remove()uses a pointer argument to return a value. How crass—use a reference, instead.
.print()that displays the list. Add another case in
main()that uses it.
.print()is tacky. Replace it with an overloaded
<<operator so you can use
LinkedListobject, just like any other type.
LinkedListobject is destroyed? Fix that.