namespace
".Everything that's part of the standard library is inside the standard namespace and things with exactly the same name can be used in the namespace, if needed. Now,there will be no problem with having to type the name of the namespace every single time classes are used when own string or own console out are not written. using
keyword tells the compiler that the code written calls the functions in the namespaces declared already.
Using never has anything to do with scope. Using is only about these namespace directives, it doesn't link new code in or add new references, anything it's simply telling the compiler, whenever cout is used and quickly go and see if it is std::cout.
The "using namespace" directive can also be used to refer only a single function in a group of functions.For example, "cin" function can be called as below
using std::in