#import <Foundation/Foundation.h>
#import "Asset.h"
@interface Person : NSObject{
int pin;
NSMutableArray* assets;
}
@property int pin;
-(void) addAsset: (Asset*) iasset; //producing error
@end
Trying to code the interface of a "Person" class that contains an array of "assets". The line
-(void) addAsset: (Asset*) iasset;
produces an error. XCode says, "Expected a type". Can someone tell me where I'm going wrong? I can provide whatever other code is needed.
Asset.h :
#import <Foundation/Foundation.h>
#import "Person.h"
@interface Asset : NSObject{
NSString* label;
int value;
Person* holder;
}
@property int value;
-(void) setHolder: (Person*)iholder;
-(void) setLabel: (NSString*)iname;
@end