hi !
This time i have trouble with the following excercise:
The following Struct Node represent Nodes of an single chained list.
struckt Node
{
int key;
Node *next;
}
The global variable
Node *head;
points to the listentry !
The listelements are sorted by the keyvalue "key" ascendingly.
A keyvalue is at most contained one time in the list.
write the function:
void removeNode(int key)
which delete the node with the keyword "key" from the list, if the list contains such a node.
Please be aware to deallcoate memory that isn't necessary anymore
//Here is my approach. But all i get from this is the values 0, 1, 2 and a strange adress in between
(i decided for pastebin again because i think it does a very good job on formating the code. I hope this is okay)
http://pastebin.com/uTjWVu47