Search code examples
c++namespacesusing

Dangers of "using namespace" in C++


Possible Duplicate:
Why is 'using namespace std;' considered a bad practice in C++?

I have been told before that there is some dangers in using using namespace ...; in C++ as it litters the global namespace or something. Is this true and are there any real dangers?


Solution

  • Dangers are only if use using namespace ... in headers. Because headers may be included anywhere.