static 、全局变量、const变量,局部变量的做用域,生命周期问题

(1)static ios     做用域 : 当前“源”文件中,其余文件没法访问c++     生命周期:整个程序运行过程 测试 测试1(静态变量放在cpp文件中):3d     .h文件代码以下: code #ifndef __FUNCTION_H__ #define __FUNCTION_H__ void print_var_1(); void print_var(); #endif /
相关文章
相关标签/搜索