当我为年龄赋值时,我得到这个错误:
@interface Person : NSObject
{
int age;
}
-(void)setAge;
@end
我尝试使用self.age
,但它没有工作
这是我的 .m 文件:
@implementation Person
-(void)setAge(int)value
{
age = value;
}
@end
我尝试了几种不同的东西。..当我输入这个时出现这个错误:age = value; 你知道这是为什么吗?