这是什么意思“ - >”? [英] What does this mean "->"?

查看:216
本文介绍了这是什么意思“ - >”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Ive几乎只在objective-c中编程,几个月前我在box2d编程了一个,并说这个 - >。这是什么意思?它的目标必须是c ++,因为box2d是c ++,我有一次看到有人在objective-c代码中使用它,我似乎不能理解它做了什么。 Google不支持非文字字符,所以它不可能为我google,因为我不知道是什么。

解决方案

$

  type * a; 

(* a).b a-> b



此处有更多信息, zh.wikipedia.org/wiki


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

这篇关于这是什么意思“ - >”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆