摘要: 为研究在目前的C标准和C++标准中全局const变量的区别,做了以下的测试:(编译器:gcc-4.7.2 ; 环境:32位Ubuntu)makefile:makec: g++ -x c test1.cpp test2.cpp -o test ./testmakecpp: g++ -x c++ test1.cpp test2.cpp -o test ./test测试0:test1.cppconst int m;int x;#define PRINT(X) printf(#X" = %d\n",X)#include <stdio.h>int main(){PRINT 阅读全文
posted @ 2013-04-03 13:10 mzorro 阅读(514) 评论(0) 推荐(0) 编辑