#include namespace A { int x = 1; } namespace B { int x = 2; } int main() { std::cout << A::x << " " << B::x << std::endl; return 0; }