Namespace is collection of classes Like package in java
Namespaces allow us to group a set of global classes, objects and/or functions under a name. To say it somehow, they serve to split the global scope in sub-scopes known as namespaces.The form to use namespaces is:namespace identifier { namespace-body }Where identifier is any valid identifier and namespace-body is the set of classes, objects andfunctions that are included within the namespace.For example:namespace general { int a, b; } In this case, a and b are normal variables integrated within thegeneral namespace. In order to access to these variables from outside the namespace we have to use the scope operator ::. For example, to access the previous variables we would have to put:general::a general::bThe functionality of namespaces is specially useful in case that there is a possibility that a global object or function can have the same name than another one, causing a redefinition error.