title: Objective C private instance variables error
body: <p>I am just starting out with Objective C  trying out a sample program about fractions from the Programming in Objective C book: </p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  
  //---- @interface section ----
  
  @interface Fraction: NSObject
  
  -(void)   print;
  -(void)   setNumerator: (int) n;
  -(void)   setDenominator: (int) d;
  
  @end
  
  //---- @implementation section ----
  
  @implementation Fraction
  {
   int  numerator;
   int  denominator;
  }
  -(void) print
  {
    NSLog (@"%i/%i", numerator, denominator);
  }
  
  -(void) setNumerator: (int) n
  {
    numerator = n;
  }
  
  -(void) setDenominator: (int) d
  {
    denominator = d;
  }
  
  @end
  </code></pre>
  
  <p>//---- program section ----</p>
  
  <p>I keep getting the inconsistent instance variable specification error for the instane variables numerator and denominator.If I move the declarations to the @interface section, the error goes away but I want to know why I am getting this error? I am using Xcode 3.6.2 on Snow Leopard 10.6.8</p>