0
我得到一個錯誤重新分配變量,「分配到從cincompatible類型‘ID’‘BNRItem’」,試圖於不同的對象分配給如果塊的外部聲明的變量。爲什麼我沒有得到同樣的錯誤時,我聲明的變量,當我嘗試重新分配它在if語句將值分配給它,但得到一個錯誤?謝謝你的幫助 !目標c錯誤中如果塊
BNRItem *p = [[[BNRItemStore sharedStore] getHighValueItems] <== no error
objectAtIndex:[indexPath row]];
if(indexPath.section==1){
*p = [[[BNRItemStore sharedStore] getLowValueItems] <== error
objectAtIndex:[indexPath row]];
}
雖然在聲明中它不是一個解引用操作符。 – 2013-03-22 16:17:43