using namespace
std;
So far in my
computer science courses, this is all we have been told to do. Not only that, but it's
all that we have been allowed to do, otherwise we get penalized on our code. I
understand, through looking at code posted online, that you can use ::std or std:: to
accomplish the same thing.
My
question is generall why? Obviously for the sake of learners and simplicity using the
global declaration is simpler, but what are the draw backs? Is it more realistic to
expect ::std in a real world application? And I guess to add on to this, what is the
logic/concept behind the using declaration? None of this has been explained during my
courses, and I'd like to get a better grasp on
it.
As a general question: if I haven't been
taught this content, vectors, templates, classes, or error handling does it seem like
I'm missing a lot of essential C++
functionality?
Thanks in
advance!
No comments:
Post a Comment