Hey there, I'm sort of new to Objective-C, and well, programming in general. I have a little experience in C# and c++, to give you a bit of a background. I'm using Xcode to create a simple application that adds 2 fields and returns a sum, and I've narrowed it down to one error:
"Nested functions are disabled, use -fnested-functions to re-enable"
Here's the bit of code I'm having trouble with, any suggestions would be greatly appreciated:
-(IBAction)click:(id)sender;
{
int main (int argc, const char *argv[]){
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int sum;
sum = myInt1, myInt2;
NSLog (name, @", the answer is %i", sum);
[pool drain];
return 0;
}
}