Lilz
Lilz

Reputation: 4081

Expected specifier-qualifier-list before '*' token Objective C

Would anyone be kind enough to explain to me what I'm doing wrong. I'm giving it :

#import <Foundation/Foundation.h>


@interface Product : NSObject {

    NSString *imageAddress;
    NSString *name;
    NSString *title;

}

@property (nonatomic, retain) *imageAddress;
@property (nonatomic, retain) *name;
@property (nonatomic, retain) *product;

@end

and its giving me:

Expected specifier-qualifier-list before '*' token

for the property calls.

Thanks

Upvotes: 0

Views: 853

Answers (1)

cobbal
cobbal

Reputation: 70733

This is gcc's cryptic way of telling you that you need a type for your properties.

@property (nonatomic, retain) NSString *imageAddress;
@property (nonatomic, retain) NSString *name;
@property (nonatomic, retain) NSString *product;

Upvotes: 5

Related Questions