这边这个人CSDN写了个面试的专栏吧,给个链接:
http://blog.csdn.net/column/details/iosinvterview.html
#import、#include、@class
#include
#include是C语言中就有的东西,也能在objective-c中使用(objective-c兼容所有的c代码)。
#include做的事情就是将对应文件的内容全部都贴过来,比如:
a.h头文件中内容是这样的:
typedef int my_number;
b.h头文件中是这样的:
#include "a.h"
#include "a.h"
那么处理器在编译之前就会将b.h的代码展开成下面的样子: