I have a linked list that has delete and retrieve functions. The retrieve searches the linked list by index and returns the value contained in the node. The delete function has a value parameter that is passed in from the client. It must use the retrieve function to search the linked list to see if the value is found before deleting it. I am stuck on how to delete the node based on the returned value. I cannot return a pointer. I have two class instance variables....head and tail. I am thinking I need to use those in some way to get the linked list node where the value was found back to the delete function, but I am not sure. Don't they need to always indicate the first and last nodes?
My code is included below. I am not getting an error, but the client is simply not deleting the node. If anyone can point me in a general direction on what I need to do here, it is much appreciated.