Is this a valid LinkedList destructor? I\'m still sort of confused by them.
I want to make sure I\'m understanding this correctly.
LinkedList::~Link
The condition "head;" should check that it is not null, but I'm not sure if it will work.
Yes, "head" by itself is the same as "head != null" -- but why use a meaningless typing shortcut if even you find it confusing? It's only 6 more keystrokes (and generates identical machine code), so go for the long form.
Additionally, your code is a bit more complicated than necessary because you are using a for() construct. Why not use a while()? Your code will be much cleaner.
Finally, I realize you are doing this as a learning exercise, but keep in mind that list<> is in the standard library --- Linked lists are official a "Solved Problem".