Using the STD namespace
The C + + language after 98 provides a global namespace namespace that avoids the problem of causing global naming conflicts. To cite an instance, note the following two header files:
One.h
char func (char);
Class String {...};
Somelib.h
Class String {...};
If defined as described above, then these two header files cannot be included in the same program because the string class conflicts.
A namespace is a way to encapsulate the name of a library, which is like a fence in each library. Like what:
One.h
...
Baidu knows:
Is the meaning of the namespace, so that the compiler at compile time equivalent to each variable is a namespace + variable name, so that in different namespaces, the same variable name, to prevent the variable name exhaustion or conflict.
When do you use it?
When you want to use the standard Template Library for C + +, you need to use the using namespace std
(go) What does the using namespace Std in C + + mean, when to use