Doubly threaded link list

This is a discussion on Doubly threaded link list within the C++ Programming forums, part of the General Programming Boards category; I am trying to remove an item in my link list. It does have 2 threads going threw it.
headByName ...

Remember I said that you need to duplicate the function body for the second threaded list? You need two of those while loops. One finds and unlinks the item from the nextByName list and the other finds and unlinks the item from the nextByRating list. Then you make one of those loops remember the pointer to the item that as unlinked and after both loops you delete that item.
Don't try and return from inside the loop.

You do have a memory leak, but only because you're setting a variable to NULL before calling delete.

When you do the unlinking in each while loop, once you find and unlink the item, break out of the loop rather than iterating over the remaining items (which you know you wont need to do anything with).