#include <iostream> using namespace std; namespace Demo { // In Demo namespace int a; } int x; // this is in global namespace namespace Demo { int b; // this is in of Demo namespace, too } int main() { using namespace Demo; a = b = x = 100; cout << a << " " << b << " " << x; return 0; }