Reputation: 408
This may sound like a silly question, but I can'f find easily any solution online.
How to declare a NSString in .h file?
I have tried this:
@property (nonatomic, retain) NSString *DATABASE_NAME;
but I get an error:
Expected member name or ';' after declaration
What's the problem here?
EDIT
My header file:
@interface GlobalVariables : NSObject
@property BOOL MAP_SATELLITE_VIEW;
@property (nonatomic, retain) NSString *DATABASE_NAME;
+ (GlobalVariables*)sharedInstance;
@end
Upvotes: 2
Views: 865
Reputation: 22946
There's nothing wrong with the code you show, so you must look in its context. Some ideas:
#import
the .h
file.DATABASE_NAME
been defined elsewhere.@property (nonatomic, assign) NSInteger dummyInt;
, or add this above that line?Upvotes: 2