问题描述
Ive几乎只在objective-c中编程,几个月前我在box2d编程了一个,并说这个 - >。这是什么意思?它的目标必须是c ++,因为box2d是c ++,我有一次看到有人在objective-c代码中使用它,我似乎不能理解它做了什么。 Google不支持非文字字符,所以它不可能为我google,因为我不知道是什么。
type * a;
(* a).b
到 a-> b
此处有更多信息,
Ive almost only programmed in objective-c, for a couple of months ago I programmed a little in box2d and say this "->". Now what does that mean? its cant be objective-c it must be from c++ because box2d is c++, I one time saw someone using it in objective-c code and I just couldn't seem to understand what it did. Google doesn't support non-text characters so its impossible for me to google it since I don't know what it is.
The -> operator is shorthand for deferencing and then accessing a member.
Given
type *a;
(*a).b
is equivalent to a->b
More information here, en.wikipedia.org/wiki
这篇关于这是什么意思“ - >”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!