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 /
相關文章
相關標籤/搜索