CGFloat height = 20;
- 聲明變量height追迟,同時(shí)定義變量
extern CGFloat height;
- extern用來(lái)在不同的文件中共享height變量逸绎,提示編譯器height是在程序中其他位置定義的饮笛,因此不需要為height分配空間
static int i = 0;
- in the C programming language,static is used with global variables to set their scope to the containing file,In local variables,static is used to store the variable in the statically allocated memory instead of the automatically allocated memory.