Objective C中关键字static、extern、const的学习

231 阅读1分钟

1、关键字static

1.1static关键字声明的变量放置的位置

static 写在interface外面 //编译器会警告 static 写在interface里面 //编译器报错 static 写在implementation外面,或者方法中 //没有警告

2、关键字extern

3、关键字const