// from: http://www.cplusplus.com/doc/oldtutorial/namespaces/
#include
using namespace std;
namespace first{
int x = 5;
int y = 10;
}
namespace second{
double x = 3.1416;
double y = 2.7183;
}
int main() {
// any unqualified names will be looked up in namespace first if not declared in the scope.
using namespace first;
// x is defined in the currect scope
int x = 0;
// x is the one declared in the current scope.
cout << x << endl;// y is not defined in the current scope, and is found in namespace first. cout << y << endl;cout << second::x << endl;cout << second::y << endl;return 0;}

![[SOLVED] CS // from: http://www.cplusplus.com/doc/oldtutorial/namespaces/](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip.jpg)

![[Solved] Python program to figure out if it is better to pay off your loans or pay off the minimal](https://assignmentchef.com/wp-content/uploads/2022/08/downloadzip-1200x1200.jpg)
Reviews
There are no reviews yet.