Hi!
In advance: sorry for the noob question but I'm learning Cocoa & Objective-C and I have this problem on which I've been searching for a complete hour. It'll be very nice if someone could find the problem!
Here's my two files: Driver.m
#import "Driver.h"
@implementation Driver
- (int)go:(BOOL)distance {
if (distance) {
return 10;
} else {
return 5;
}
}
- (NSString *)firstName {
return firstName;
}
- (void)setFirstName:(NSString *)name {
[name retain];
[firstName release];
firstName = name;
}
- (void)dealloc {
[firstName release];
[super dealloc];
}
@end
And here is the other one: Driver.h
#import <Cocoa/Cocoa.h>
@interface Driver : NSObject {
NSString *firstName;
}
- (int)go:(int)direction theDistance:(BOOL)distance;
- (NSString *)firstName;
- (void)setFirstName:(NSString *)name;
@end
The problem is happening at the @end line of my implementation of Driver. I tried to clean and build, and I looked up google but did not found any help yet.
Thanks a lot!