views:

70

answers:

1

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 -fnested-functions to re-enable

How can i enable nested functions It says "use -fnested-", but use is where? how?

for (MyObject *obj : array)
{

}
+3  A: 

I think you mean:

for (MyObject * obj in array) { ... }

(Note that you use in and not :.

Dave DeLong
got it confused with java
aryaxt