mirror of
https://github.com/wangdoc/clang-tutorial.git
synced 2026-02-11 06:35:43 +08:00
docs(): fixed #19
This commit is contained in:
@@ -360,6 +360,8 @@ int main(void) {
|
||||
|
||||
上面示例中,函数`foo()`定义在其他文件,`extern`告诉编译器当前文件不包含该函数的定义。
|
||||
|
||||
不过,由于函数原型默认就是`extern`,所以这里不加`extern`,效果是一样的。
|
||||
|
||||
### static 说明符
|
||||
|
||||
默认情况下,每次调用函数时,函数的内部变量都会重新初始化,不会保留上一次运行的值。`static`说明符可以改变这种行为。
|
||||
|
||||
Reference in New Issue
Block a user