多为传入多个变量或方法没有空格引起,在第二变量的冒号前面加个空格既可以解决。
-(int)sum:(int) num1 :(int)num2;
-(int)sum:(int)num1 :(int)num2{
int num3=num1+num2;
return num3;
}
多为传入多个变量或方法没有空格引起,在第二变量的冒号前面加个空格既可以解决。
-(int)sum:(int) num1 :(int)num2;
-(int)sum:(int)num1 :(int)num2{
int num3=num1+num2;
return num3;
}