Pointer to Pointer problem

Hi,

I have a problem, imagine:

1
2
3
...
(*pp)->parent->next = p;
...



pp is a pointer to pointer, and p it's just a pointer, by doing this, i'm changing next pointer itself, instead of what next points to, why?
Last edited on
*(*pp)->parent->next=*p; //(* has a lower precedence than ->)
sorry, i think i found my problem, and it's not related with what you posted, because by doing that i would be making a copy of what the pointers point to.

My problem was like, (*pp) points to the same place that next points to, and changing next i was also changing (*pp), because next was actually (*pp) lol.

Thanks anyway :)
Last edited on
Topic archived. No new replies allowed.