摘要:
新建一个类 new file ->cocoa class (父类NSObject) .h文件 用来定义属性和方法 .m文件 用来具体实现方法声明:1 #import 2 @interface Person : NSObject{3 NSString *name;4 int a... 阅读全文
摘要:
#import 与 #include区别include完成头文件的导入,可能会导致头文件的相互引用和函数或变量的重复定义 为了解决这个问题 我们必须这样做 #ifndef Student_h #define Student_h //方法的声明 #endifimport不仅完... 阅读全文