What does this mean “->”?

后端 未结 1 780
我在风中等你
我在风中等你 2020-12-10 12:00

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

相关标签:
1条回答
  • 2020-12-10 12:05

    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

    0 讨论(0)
提交回复
热议问题