djfkdjfkd39939
djfkdjfkd39939

Reputation: 393

C++ Pointer Syntax ->

I was trying to understand what a->b referred to and I was able to understand it refers to

(*a).b

where a is a pointer. What does a->b->c mean in those terms - i.e. is it (*((*a).b)).c?

Upvotes: 0

Views: 78

Answers (1)

Emil Laine
Emil Laine

Reputation: 42828

Yes, a->b->c is equivalent to (*(*a).b).c which is equivalent to (*((*a).b)).c.

Upvotes: 2

Related Questions