Lottery.m error with nested functions


I am getting this error in my lottery.m code:

/Users/user/Dropbox/dev/cocoa_programming_for_os_x/lottery/LotteryEntry.m:43: error: nested functions are disabled, use -fnested-functions to re-enable

I am running XCode 3.2.5 on OS 10.6.7

Here is my full lottery.m code:

I am also getting these two errors but I asume they may be related to the first:

/Users/user/Dropbox/dev/cocoa_programming_for_os_x/lottery/LotteryEntry.m:43: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘result’
/Users/user/Dropbox/dev/cocoa_programming_for_os_x/lottery/LotteryEntry.m:43: error: ‘result’ undeclared (first use in this function)



You appear to be missing a semicolon on line 42, after NSString *result. The first error message was entirely unhelpful here, it was the latter two that tipped me off.



Wow… How slow am I.

Works perfect! Thanks.


No worries. Happens to the most experienced of devs.