[Solved] Arrow vs dot syntax? [duplicate]

[ad_1]

Normally the . is used when you have a structure to access directly, and the -> when you have a pointer to a structure and need to dereference it to access the structure.

a->b is syntactic sugar for (*a).b. It’s the same in both C and C++.

0

[ad_2]

solved Arrow vs dot syntax? [duplicate]