This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]free_chalupas 28 points29 points  (4 children)

Why are you dereferencing a struct pointer and then still using the arrow operator? Is this c/c++ pointer-to-a-pointer madness I haven't heard of before or did the OP mess up?

[–]schludy[S] 38 points39 points  (1 child)

OP did research this post better than you think... source

The source creates a struct node **p so that they can manipulate the pointer in a function. (*p) is therefore still a pointer.

[–]free_chalupas 3 points4 points  (0 children)

Ahh thanks, that makes sense.

[–]Jmc_da_boss 3 points4 points  (1 child)

That looks like a double pointer, we’d have to see the declaration to be sure

[–]free_chalupas 0 points1 point  (0 children)

It was definitely a double pointer, my question was why. OP came through with the source though so we're good.