I am trying to compile my game and an error that shouldn’t be coming up is.
These are the files for my class:
Circle.h:
#import <UIKit/UIKit.h>
@interface Circle : NSObject
{
}
@property (readwrite, assign) CGPoint Center;
@property (readwrite, assign) float Radius;
+ (Circle *) CircleMakeFromCenter:(CGPoint)center radius:(float)radius;
@end
Circle.m:
#import "Circle.h"
@implementation Circle
@synthesize Center;
@synthesize Radius;
+ (Circle *) CircleMakeFromCenter:(CGPoint)center radius:(float)radius{
Circle *c = [[Circle alloc] init];
c.Center = center;
c.Radius = radius;
return c;
}
@end
It is bring up an error saying that Radius is a duplicate symbol.
Why would it bring up this error?
The most common reason for this sort of error in Objective-C is that you have put this in one of your files accidentally:
when you should have put this: