https://blog.youkuaiyun.com/guotianqing/article/details/79828100
google c++ 规范, 鼓励使用static. 但是禁止在头文件中使用staic.
无论是在.h 函数声明前使用static, 是还在.c文件中使用static 修饰。 都会导致在其他文件中无法使用该变量或者方法。
在头文件或者.c文件中用static修饰, 使得只在本文件中可见。 可以保证即使全局域有重名的也不会冲突。
https://blog.youkuaiyun.com/guotianqing/article/details/79828100
google c++ 规范, 鼓励使用static. 但是禁止在头文件中使用staic.
无论是在.h 函数声明前使用static, 是还在.c文件中使用static 修饰。 都会导致在其他文件中无法使用该变量或者方法。
在头文件或者.c文件中用static修饰, 使得只在本文件中可见。 可以保证即使全局域有重名的也不会冲突。