Objective-C (aClassName *)

后端 未结 3 982
迷失自我
迷失自我 2021-01-28 21:46

I\'m a kind of self-programmer-made-man, so I\'m missing some basic knowledge from time to time.

That\'s why I\'m unable to really define well the topic of my question,

3条回答
  •  隐瞒了意图╮
    2021-01-28 22:39

    It is type cast:

    double x = 5.0;
    int y = (int)x;
    

    I don't know why it is there in your case, as far as I know that method returns id, so the cast is not necessary (even without it no compiler warning will be generated).

    Regarding “where to find such information”: Objective-C/C++ are built upon C and C++ correspondingly, so I'd recommend to learn basics of those languages first.

提交回复
热议问题