美文网首页
Hiding variable and function nam

Hiding variable and function nam

作者: 蜀中马谡 | 来源:发表于2015-06-13 16:13 被阅读0次

C programmers use the static attribute to hide variable and function declarations inside modules, much as you would use public and private declarations in Java and C++. C source file play the role of modules. Any global variable or function declared with static attribute is private to that module. Similarly, any global variable or function declared without the static attribute is public and can be accessed by any other module. It is good programming practice to protect your variables and functions with the static attribute wherever possible.

相关文章

网友评论

      本文标题:Hiding variable and function nam

      本文链接:https://www.haomeiwen.com/subject/etgjqttx.html