You should avoid namespace level using directives (e.g., using namespace std) and using declarations in header files (e.g., using std::cout). The reasons have been outlined by legit and Salem. However, note that this is not necessarily the case for a more restricted scope, e.g., the use of the using declaration to bring in names from a base class that would otherwise be hidden, or in the definition of an inline function.Originally Posted by swappo
Originally Posted by legitNote that you can still fully qualify the names even when using directives and using declarations are in effect... but if you do not do this when you should, it could be possible for your code to compile and be mysteriously incorrect.Originally Posted by Salem