开发者

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

开发者 https://www.devze.com 2023-01-17 06:11 出处:网络
Would anyone be kind enough to explain to me what I\'m doing wrong. I\'m giving it : #import <Foundation/Foundation.h>

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;
    NSStri开发者_JAVA百科ng *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


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;
0

精彩评论

暂无评论...
验证码 换一张
取 消