I have followed this tutorial several times trying to figure out what was making it come up with the parse error, but I just keep having the same errors.
On the Converter.m file there are two errors.
The first error: parse error before 'AT_NAME' token
Then the second error: parse error before '{' token
Then one more error on the Converter.h file
The error: parse error before '@' token
I copied the codes straight from Apples Tutorial.
Also, I am running OS X 10.4.11 and Xcode 2.5
All help is greatly appreciated.
And if you know of any great online tutorials or anything that would help me learn Cocoa, that would be great. Coming from being a web developer, I thought learning Cocoa would be easy. Lots of it is similar to PHP, but its still very confusing for me. Thanks!
On the Converter.m file there are two errors.
Code:
#import "Converter.h"
@implementation Converter
@synthesize sourceCurrencyAmount, rate;
- (float)convertCurrency {
return self.sourceCurrencyAmount * self.rate;
}
@end
The first error: parse error before 'AT_NAME' token
Code:
@implementation Converter
Then the second error: parse error before '{' token
Code:
- (float)convertCurrency {
Then one more error on the Converter.h file
Code:
#import <Cocoa/Cocoa.h>
@interface Converter : NSObject {
float sourceCurrencyAmount, rate;
}
@property(readwrite) float sourceCurrencyAmount, rate;
- (float)convertCurrency;
The error: parse error before '@' token
Code:
@property(readwrite) float sourceCurrencyAmount, rate;
I copied the codes straight from Apples Tutorial.
Also, I am running OS X 10.4.11 and Xcode 2.5
All help is greatly appreciated.
And if you know of any great online tutorials or anything that would help me learn Cocoa, that would be great. Coming from being a web developer, I thought learning Cocoa would be easy. Lots of it is similar to PHP, but its still very confusing for me. Thanks!
