标签:
使用命名空间,可以避免重名问题
例如:
#include<iostream> namespace a{ int x = 8; } namespace b{ int x = 9; } int main(){ int x = 10; std::cout << a::x << b::x << x << std::endl; return 0; }
1.5 重名问题
原文地址:http://www.cnblogs.com/cplusplus-study/p/4503046.html