Reputation: 43
#import <Foundation/Foundation.h>
#import "SuperHero.h"
'missing @end'
@implementation Superhero : NSObject
-(int)Fight:(int)enemyStamina{
int resultingStamina = enemyStamina - 5;
return resultingStamina;
}
@end
Upvotes: 2
Views: 53
Reputation: 689
This is valid code (syntax). Without header code I can't say more, but probably You miss @end
in header file. Also, try to clean and rebuild your project.
Also, as kambala mentioned, specify inheritance with @interface
directive.
Upvotes: 1
Reputation: 2511
Inheritance is specified only in the @interface
section. So remove the : NSObject
part in your code and you'll be fine.
Upvotes: 0