Namespace
Namespace is a quick way to provide static-class like features. For example, considering this Namespace:
namespace Container {
int id = { 12 };
namespace Server {
const char* ip() {
id = 40;
return "192.168.1.1";
}
}
}
We can then refer to each of the element here like:
cout << Container::id << endl; // return 12
cout << Container::Server::ip() << endl; // return 192.168.1.1
cout << Container::id << endl; // return 40; since the ip() modify this value