Why do some code listings for learning C++ have the entire namespace
std being used while others just specify the parts they want to use?
You'd really have to ask the person who wrote the code, if you want to know
why they wrote it that way. Personally, I never write "using namespace
std;", because it's overkill. Why do I need the netoire std namespace?
Often, I just need string, cin, cout, and endl. I sometimes write "using
std::cout;" or similar using statements. Other times I just specify the
std:: with whatever I'm using from it. It all depends on how readable it
makes the code, and how much it's really saving me to use a using statement
at all.
-Howard