views:

46

answers:

1

Hello

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

+5  A: 

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;
cobbal
oh my. I've been staring at it for hours and didn't even realize. Many thanks.
Lily
A stated objective of clang is to provide more intuitive error messages. You might try switching the (even temporarily when gcc is being opaque).
0x4b