
Objective C
hehailin19860604
大家好 请多多关照啊!
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
stray '@' in program expected '=', ',', ';', 'asm' or '__attribute__' before XXX
写了个例子,一直编译不过,后来确认gnustep不支持@property 和 @synthesize语法; @property 和 @synthesize配对使用,用于生成setter和getter方法。 仅记录下。原创 2013-01-03 18:06:20 · 322 阅读 · 0 评论 -
实例变量的位置
@implementation Fraction { int numerator; int denominator; } 按照书中提供的例子将实例变量放到@implementation 中,但是在编译后一直出现错误: In file included from testFraction.m:3: Fraction.m:7: error: inconsistent instan...原创 2013-01-03 18:11:46 · 296 阅读 · 0 评论