"." or "->" C struct accessor [duplicate]

The -> operator is only syntactical sugar:

x->y

is the same as

(*x).y

The parentheses are necessary due to the . operator having higher precedence than the * operator.

Browse More Popular Posts

Leave a Comment