【发布时间】:2011-07-12 09:38:00
【问题描述】:
有如下代码,在for语句初始化的xs处得到上述错误。没有在 Xcode 3 中得到它,只是在我今天安装 Xcode 4 时出现。 xs 是一个
int xs = 0;
for (xs; xs<3; xs++) {
if ([colorLayoutArray objectAtIndex:xs] == [colorLayoutArray objectAtIndex:xs+1]){
rowCorrectCount = rowCorrectCount +1;}
}
有什么线索吗?
【问题讨论】:
-
你正在粘贴一个片段,所以我们看不到变量声明,尤其是 rowCorrectCount 是什么以及它是如何使用的。