Hello I am getting this error:
error: expected '=',',',';', 'asm' or 'attribute' before '.' token

I am not sure what is causing it, it's probably something stupid which I have over looked, here is the problem code.
This is a mac app btw

DataClass *obj=[DataClass getInstance];  
obj.str= @"test";  

Here is the relevant header and main as well.


@interface DataClass : NSObject {    

NSString *str;     

@property(nonatomic,retain)NSString *str;    


@implementation DataClass    
@synthesize str;    
static DataClass *instance =nil;    
+(DataClass *)getInstance    

            instance= [DataClass new];    
    return instance;    
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.