Fork me on GitHub
摘要: ### Const那些事#### const对象默认为文件局部对象注意:非const变量默认为extern。要使const变量能够在其他文件中访问,必须在文件中显示地指定它为extern。##### 未被const修饰的变量在不同文件的访问```c++//file1.cppint ext; //默认为extern//file2.cpp#include extern int ext;int main... 阅读全文
posted @ 2020-06-24 19:55 Rser_ljw 阅读(187) 评论(0) 推荐(0) 编辑