My problem here is that I have created 2 classes. One called Object, of which there will be multiple instances created, holding coords, and a few other bits of information about the object, and another called level. This one will be used to create and manage these instances.
#import "Object.h"
@implementation Object
-(void) Create {
coordx = 0;
coordy = 0;
active = 0;
turndirection = 0;
}
@end
and this is level.
#import "Level.h"
#import "Object.h"
@implementation Level
Object *myObj = [[Object alloc] init];
@end
Pretty basic at the moment but I've just started out. My problem is just after creating the new instance of Object I get an error saying "Initializer element is not constant".
What am I doing wrong here?
#import "Object.h"
@implementation Object
-(void) Create {
coordx = 0;
coordy = 0;
active = 0;
turndirection = 0;
}
@end
and this is level.
#import "Level.h"
#import "Object.h"
@implementation Level
Object *myObj = [[Object alloc] init];
@end
Pretty basic at the moment but I've just started out. My problem is just after creating the new instance of Object I get an error saying "Initializer element is not constant".
What am I doing wrong here?