开发者

import in objective C

开发者 https://www.devze.com 2023-02-13 16:49 出处:网络
why we import heade开发者_开发百科r file in the other file.Its just another name, rather than #include

why we import heade开发者_开发百科r file in the other file.


Its just another name, rather than #include

If you do not import the header file then the compiler doesn't know where some of the things you use in your code come from. Its like importing a dictionary when you are writing in a foreign language, without the dictionary you don't know what everything means or does.


In general "importing" (including) source files/header files is meant to let the current file "see" the objects defined in the imported one.

0

精彩评论

暂无评论...
验证码 换一张
取 消