[Solved] Arrow vs dot syntax? [duplicate]


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

solved Arrow vs dot syntax? [duplicate]