gpt4 book ai didi

iphone - (anObject *)在语句前做什么?

转载 作者:行者123 更新时间:2023-12-01 18:01:15 29 4
gpt4 key购买 nike

Possible Duplicate:
what is this weird code notation mean


我之前曾问过这个问题...

Understanding memory management in ios

那条疑问线没有教我的一件事是(NSArray *)在以下语句中做了什么:

NSArray *myArray = (NSArray *)[someNSSet allObjects];

为什么不只是:
NSArray *myArray = [someNSSet allObjects];

或换种说法,这两个语句在功能上有何不同?目前我不了解 (NSArray *)位,所以我只是忽略了它,对我来说它们看起来一样!

提前致谢

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com