Been working on a Linked List for class and I can't seem to fix this one last function. The extract function should search, find, and delete a link that matches some data value. It works when the data is the first item, but anything else causes it to crash. I've gone through and tried everything I could think of but it still won't work, so now I'm asking for help.
This is the basic structure:
1 2 3 4 5 6 7 8 9 10 11 12
template <class T>
class LLVector
{
private:
struct Link
{
T data;
Link *next;
};
Link *head;
Link *current;
int size;