why using directive in C++ is not encouraged?

c++

Solution

`using namespace x;` is a very bad idea, since you have no idea what names you are importing, even with the standard library.

However: `using std::cout;` and similar statements are a very good idea, because they import symbols explicitly, and make code more readable (though it still might not be a good idea to put them in the global scope in header files).

Problem

I read that using directive is not encouraged in C++ saying never put using directives in header files. Why is it like that? Any hint for me? Thanks!

Original source