title: Objective-C error "No visible @interface for 'XYZPerson' declares the selector 'saySomething'
body: <p>I am  really new to Objective-C and when I was practicing the book exercises, I really am stuck here. Please help me solve this and I have been thinking what could cause this error for more than three hours. Still I didn't get it!</p>
  
  <p>Best regards,
  Raj.</p>
  
  <p>Thanks in advance !</p>
  
  <p><strong>main.m</strong></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  #import "XYZPerson.h"
  #import "XYZShout.h"
  int main(int argc, const char * argv[])
  {
  
      @autoreleasepool {
  
          //XYZPerson *some = [[XYZPerson alloc]init];
  
          XYZShout *some = [[XYZShout alloc]init];
          [some sayHello];
  
  
  
          // insert code here...
         // NSLog(@"Hello, World!");
  
      }
      return 0;
  }
  </code></pre>
  
  <p><strong>XYZPerson.h</strong></p>
  
  <pre><code>#import &lt;Foundation/Foundation.h&gt;
  @interface XYZPerson : NSObject
  
  @property NSString *firstName;
  @property NSString *secondName;
  @property NSDate *dob;
  
  -(void) saySomething;
  -(void) sayHello;
  
  @end
  </code></pre>
  
  <p><strong>XYZPerson.m</strong></p>
  
  <pre><code>#import "XYZPerson.h"
  @implementation XYZPerson
  
  -(void) sayHello {
      [self saySomething:@"Hello all"];
  }
  
  -(void) saySomething:(NSString *)greet {
      NSLog(@"%@", greet);
  }
  
  @end
  </code></pre>
  
  <p><strong>XYZShout.h</strong></p>
  
  <pre><code>#import "XYZPerson.h"
  
  @interface XYZShout : XYZPerson
  
  // -(void) saySomething;
  
  @end
  </code></pre>
  
  <p><strong>XYZShout.m</strong></p>
  
  <pre><code>#import "XYZShout.h"
  
  @implementation XYZShout
  
  -(void) saySomething:(NSString *)greet {
      NSString *upperGreet = [greet uppercaseString];
      [super saySomething:upperGreet];    // this is where I get the error mentioned above
  }
  
  @end
  </code></pre>
  
  <p><strong>Got it working ! Thanks to @MatthewD , @trojanfoe , @JFS for your big help :)</strong> </p>