Possible Duplicate:
What is “->” in Objective C?
beginner question here. Im looking through this intro to the objective c runtime (http://mikeash.com/pyblog/friday-qa-2009-03-13-intro-to-the-objective-c-runtime.html) and I see this funky syntax with a ->. Can’t seem to find an explanation on what that means.
Easy points anyone?
Thanks!
That is actually C syntax. It’s used to access a field (variable) of a pointer to a struct.
When you have a pointer, you have to use the
*syntax to dereference it:Now, if this pointer happens to be a struct pointer, it can become ugly: