Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我几乎只在objective-c中编程,几个月前我在box2d中编程了一点,然后说这个“->”。这是什么意思?它不能是objective-c,它必须来自c++,因为box2d是c++,我曾经看到有人在objective-c代码中使用它,但我似乎无法理解它做了什么。谷歌不支持非文本字符,所以我不可能用谷歌搜索它,因为我不知道它是什么。
-> 运算符是deferencing 然后访问成员的简写。
给定
type *a;
(*a).b相当于a->b
(*a).b
a->b
更多信息在这里,en.wikipedia.org /wiki