Pavel Topinka
Pavel Topinka

Reputation: 95

XCode 4.2.1 iOS 5 Expected function body after function declarator

2.1

I am getting error during compilation

Expected function body after function declarator.

My code is quite simple and I found that this problem occur in former XCode versions but I can't find solution for version 4.2.1. Does somebody have same problem ?

#import <Foundation/Foundation.h>

@interface CalculatorBrain : NSObject

_ (void)pushOperand:(double)operand;

_ ( double)performOperation:(NSString *) operation;

@end

Upvotes: 1

Views: 2282

Answers (1)

zaph
zaph

Reputation: 112857

Use a minus "-" character instead of underscore "_".

#import <Foundation/Foundation.h>

@interface CalculatorBrain : NSObject

- (void)pushOperand:(double)operand;

- (double)performOperation:(NSString *)operation;

@end

Upvotes: 3

Related Questions