开发者

Objective-C -> symbol? [duplicate]

This question already has answers here: Closed 12开发者_JS百科 years ago.

Possible Duplicate:

What is “->” in Objective C?

what is the "->" in objective-c? And what is it used for?


It's the same as in C. Objective-C is a strict superset of C, so it inherits all the syntax. In C:

x->y

is the same as:

(*x).y

The syntax *x dereferences the pointer x, and . accesses a property on the result of the dereferencing.


-> is for Accessing instance variables (Pointers)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜