开发者

Obj c for loop showing out of scope on variable

I am trying to write a for loop in Obj-c and getting 'out of scope' on my var

for ( myObject *i in blah ) {
 i.somevar  开发者_Python百科<--- i showing out of scope in debug mode.
}


myObject should be MyObject; class names are capitalized in Objective-C.

If you are building for Release, the optimizer is on and it could easily be optimizing away i.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜