namespaces : Functions, classes, variables, etc. that distinguish the same names in different libraries as additional information, define the context, define the scope;
namespace name{...} Definition of namespaces
Name:: Code; Calls a function or variable with a namespace code
The using namespace directive tells the compiler that subsequent code uses the name in the specified namespace
disjoint namespaces :
A namespace consists of several individually defined parts that can be scattered across multiple files;
A part of the namespace is in a separate file, you need to declare the name;
You can define a new namespace, or you can add new elements of an existing namespace;
nested namespaces :
Another namespace can be defined in one namespace;
Namespace name1
{
Namespace Name2
{
}
}
To access members in a nested namespace by :: operator:
Using namespace name1:: name2; If you use a slow look at 1, the elements in namespace 2 are also available;
C + + namespaces