Why is 'using namespace std;' considered a bad practice in C++?
- by Mana
Okay, sorry for the simplistic question, but this has been bugging me ever since I finished high school C++ last year. I've been told by others on numerous occasions that my teacher was wrong in saying that we should have "using namespace std;" in our programs, and that std::cout and std::cin are more proper. However, they would always be vague as to why this is a bad practice.
So, I'm asking now: Why is "using namespace std;" considered bad? Is it really that inefficient, or risk declaring ambiguous vars(variables that share the same name as a function in std namespace) that much? Or does this impact program performance noticeably as you get into writing larger applications?
I'm sorry if this is something I should have googled to solve; I figured it would be nice to have this question on here regardless in case anyone else was wondering.