作者dryman (dryman)
看板MacDev
標題[問題] 多重參數
時間Thu Dec 18 00:13:39 2008
請問一下:
在編寫cocoa時有種多重參數的寫法:
- (void) setDeg0:(int)a0 andDeg1:(int)a1 andL0:(float)a2 andL3:(float)a3;
我在網路上查到的資料看來這樣應該是沒問題
但xcode顯示這樣是conflicting type
傳入值時更會顯示error
@@"為什麼會這樣啊?
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 61.228.97.189
1F:→ yllan:因為宣告的和你傳進去的不一樣? 12/18 00:27
2F:→ dryman:是一樣的,我還沒傳進去前就顯示conflicting type了 12/18 08:39
3F:→ dryman:囧,我發現好像是我宣告的那地方有漏字母 12/18 08:40
4F:→ yllan:通常這種都是自己耍笨。有沒有用 auto-complete 呢? 12/18 10:40