What does -> mean?

前端 未结 5 909
太阳男子
太阳男子 2021-01-12 13:03

I\'m a relative newbie to Objective-C (only studied Arron Hillegras\'s book) and am confused by the following snippit of code I\'ve found in one of Apple\'s code examples, i

5条回答
  •  时光说笑
    2021-01-12 14:04

    That indicates a reference to -in this case- an instance variable of an object. Self refers to the object itself, and by writing self->_numbers, you refer to the variable that is part of the class instead of a global variable named _numbers.

    Are you sure this is not mentioned in your book?

提交回复
热议问题