"Barry Schwarz" <> ha scritto nel messaggio
news:c5rr1i$oql$0@216.39.135.209...
[CUT]
> remove_key requires a value (C always passes by value) that points to
> a pointer. The proper method of constructing such a value when all
> you have is the original pointer is the "address of" operator, the &.
> What your code needs is
> remove_key(&(temp->next), key);
> Since -> has higher precedence than &, the internal parentheses are
> superfluous but some like to keep them for the visual hint.
Thanks for explanations. I'm new into managing dynamic data structures (like
linked lists) and programming it in C, as I'm studying Computer Sciences.
Now I understand it. I was not sure about the casting, but it worked and
that was good. But not good enough to live without asking

I used to
manage passing pointers with & operator, but haven't thought about it in
this case. It's really kind of you. Thanks a lot.
> The next question is: why are you doing this recursively? It is
> relatively simple (and much easier to debug) to do this with a loop.
I'm also learning programming using recursion ... and a code like this is
also simple in the recursive way.
--
Emanuele Blanco
PGP Key Available