gpt4 book ai didi

c - 在 Objective C 中声明方法的参数时出错

转载 作者:行者123 更新时间:2023-11-30 19:20:54 26 4
gpt4 key购买 nike

我不确定我在这里做错了什么,我正在遵循在线教程(thenewboston),并且收到一条错误消息“w 用作前一个参数的名称,而不是作为选择器的一部分。 ”

-(void)setWH: (int) w:(int) height;

最佳答案

您缺少部分选择器名称:

- (void)setWidth:(int)width height:(int)height;
// ^--- You're missing this.

关于c - 在 Objective C 中声明方法的参数时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20896431/

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