ProAnswers.org

is it bad practice to use 'using namespace std;' in C++?

is it bad practice to use ‘using namespace std;’ in C++?

I think it’s bad to put it in the header files of your classes: because then you would be forcing anyone who wants to use your classes (by including your header files) to also be ‘using’ (i.e. seeing everything in) those other namespaces.

However, you may feel free to put a using statement in your (private) *.cpp files.