1 – All the entities (variables, types, constants, and functions) of the standard C++ library are declared within the
using namespace std; introduces direct visibility of all the names of the std namespace into the code.
2 – Namespaces in C++ are most often used to avoid naming collisions. Although namespaces are used extensively in recent C++ code, most older code does not use this facility. For example, the entire C++ standard library is defined within
namespace std, but before standardization many components were originally in the global namespace.