| Since you're using single linked lists, it is only possible to search forward, which means in your add function you will see the item at hand, and the next one, which most likely will be either NULL or the newly added item.
I must boldly admit, I havn't taken the time, to closely read your code, so I have no generel knowledge of what exactly it is you're trying todo...
If I do get the time, I might try and come up with my solution to your problem during this weekend. |