I used to be able to do forEach loops in XCode, but after installing sdk 4 i get errors
error: nested functions are disabled, use -fnest开发者_StackOverflowed-functions to re-enable
How can i enable nested functions It says "use -fnested-", but use is where? how?
for (MyObject *obj : array)
{
}
I think you mean:
for (MyObject * obj in array) { ... }
(Note that you use in
and not :
.
精彩评论