Simple explaination of -> accessor

Just getting finished with 110 and thought I would try to put the -> in my own words. When we want to access a class object we use a “.” but when we want to point to class object we will use a -> instead of a “*” .
Is that fairly on the nose?

The main difference to me is that for a.b vs a->b is that for a.b, a would have to be an instance of the class and a->b would be for when a is a pointer to an object.

Privacy & Terms