junior_developer
junior_developer

Reputation: 7

error: Expect ")" before CLLocation

I got this error:

Expect ")" before CLLocation

My code:

MyAppDelegate.h

@protocol AskerConnectionDelegate
-(void) postNewQuestionForUserID: (NSString*)uID Text: (NSString*)text location: (CLLocation*)loc; 

@end

Upvotes: 0

Views: 77

Answers (1)

EmptyStack
EmptyStack

Reputation: 51374

You should import the necessary header files.

#import <MapKit/MapKit.h>

Or just add a @class directive before the @protocol declaration,

@class CLLocation;

Adding a @class directive just lets the compiler know that the particular class exists without having to import the header file.

Upvotes: 2

Related Questions