Logic problem adding nodes to linked list

This is a discussion on Logic problem adding nodes to linked list within the C++ Programming forums, part of the General Programming Boards category; I seem to be having trouble with the logic in the following function. Calendar has a double-linked list of events, ...

Logic problem adding nodes to linked list

I seem to be having trouble with the logic in the following function. Calendar has a double-linked list of events, and I want to add events, and have them sorted upon being added. Unfortunately, when I test it, all of them are simply appended to the end of the list. To be honest, so far I haven't done more than three Events on a single execution.