// sample program to understand namespacee using namespace std; #include namespace myspace0{ int n = 1001; } namespace myspace1{ int m = 1002; } int main() { myspace0::n = 2001; cout << "testing namespace" << endl; cout << "myspace1::m=" << myspace1::m << endl; using namespace myspace1; using namespace myspace0; cout << "myspace0::n=" << n << endl; cout << "myspace1::m=" << m << endl; return 0; }