title: Why am I seeing the "Nested functions are disabled" error?
body: <p>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:</p>
  
  <blockquote>
    <p>"Nested functions are disabled, use -fnested-functions to re-enable" </p>
  </blockquote>
  
  <p>Here's the bit of code I'm having trouble with, any suggestions would be greatly appreciated:</p>
  
  <pre><code>-(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;
   }
  }
  </code></pre>