摘要: main.m文件:#import #import "hearts.h" #import "spade.h"#import "wintersweet.h"#import "diamonds.h" #import "stdio.h"#import "string.h"int main(int argc, const char * argv[]){spade *m1=[spade alloc];hearts *m2=[hearts alloc];wintersweet *m3=[w 阅读全文
posted @ 2014-01-12 22:59 恋~时光 阅读(168) 评论(0) 推荐(0) 编辑
摘要: 1、oc中,方法分为类方法和实例方法,类方法用“+”声明,实例方法用“-”声明,类方法用类名调用,实例方法用对象调用;2、对象:一个具体的存在;3、类:对同类事物的抽象,是同一类事物的统称;4、属性:一类事物的性质;5、方法:对象的行为;6、变量:一段存储空间的名称;7、一个文件中可以声明多个类,并且实现的顺序和声明的顺序无关。 阅读全文
posted @ 2014-01-12 10:44 恋~时光 阅读(127) 评论(0) 推荐(0) 编辑