Hey guys am i correct in saying that the -> is only used when
you have a pointer to a struct and when there is not a pointer to a struct you use a dot?
Hey guys am i correct in saying that the -> is only used when
you have a pointer to a struct and when there is not a pointer to a struct you use a dot?
Just to elaborate a bit: foo->bar is equivalent to (*foo).bar
But as you can see, the former is much easier to figure out at a glance, and yes, the parentheses are necessary.
If you understand what you're doing, you're not learning anything.