I have these two classes MobRec & MobDef and I want to reference an array pointer of (MobDef) *mobInfo from MobRec. #import the mobdefs.h file in MobRec.h or .m but no luck any ideas?
MobRec.h
// Basic class unit
@interface MobRec : NSObject {
NSString *mName;
int speed;
}
@end
MobDef.h
// Master Class holding an array of units
@interface MobDef : NSObject {
NSMutableArray *mobInfo;
}
@property(retain) NSMutableArray *mobInfo;
@end
MobDef.m
@synthesize MobInfo;
- (id)init { // to add a new node and initialize it
mobInfo = [[NSMutableArray alloc] init];
MobRec *aNewMobRec = [[MobRec alloc] init];
[mobInfo addObject:aNewMobRec];
[aNewMobRec release];
}