Basically,
a->b
is
(a*).b
Dot (.)
- can't be overloaded (I'll figure out what that means later)
- used to access a member within a derefenced pointer (so, it's pretty much outdated when it comes to pointers)
Arrow (->)
- CAN be overloaded (yay)
- used to access a member within a pointer
source: http://stackoverflow.com/questions/1238613/what-is-the-difference-between-the-dot-operator-and-in-c
searches:
c++ dot versus arrow
cpp dot arrow
No comments:
Post a Comment