the general consensus is not to reveal too much of a particular namespace to a component that doesn't need it, if you only need cout from the std namespace for example put the std:: prefix on them all or declare using std::cout; rather than usingnamespace std;.
Imagine if you create an object with the same name as an object in the std namespace, you may not even have made it yet, but one might be created later in the project, now how is the compiler supposed to know whether you want to use the object from the std namespace of your own object which you just happened to give the same name? Putting std:: before all instances of cin, cout, string etc. prevents possible name clashes.