So, my next task I'd like to do is create a remove/delete method that removes by value. The value will be passed into the method by value(heh, the irony). Anyways, what I've discovered is if you want to add to the list, you can't go beyond the position you want to place it, therefore you need to stop one position BEFORE the position you want to add. What my question is if you have a value you want to remove, how would you do that? Would you need to check the data BEFORE you traverse forward in the while loop?
I don't even understand what BEFORE means.
The process of removing by vale is
1 2 3 4 5 6 7 8
Node* nod = find_node_by_value(val);
//find_node_by_value is the most obvious while loop
if(nod != NULL) erase_node(nod);
//erase_node (assuming doubly linked list)
//connects nod->prev with nod->next.
//remember to fix your first_node and last_node
//pointers if needed