H
Halcyon
so i've been "using namespace std" happily in all my source files at
the global scope, and i then go to to use cout, vector, string etc
without having to use std:: everytime. However today i was informed
that i should eschew "using namespace std" and use "using std::string",
"std::vector" et al.
I don't quite get what the potential drawbacks of "using namespace std"
are...
i perused a few books, but most authors *do* use "using namespace std",
and the person who asked me to make the change wouldn't explain.
I was under the impression that the using keyword just lets the
compiler know where to look...
i mean, would it make a difference in code size or anything?
cheers,
G
the global scope, and i then go to to use cout, vector, string etc
without having to use std:: everytime. However today i was informed
that i should eschew "using namespace std" and use "using std::string",
"std::vector" et al.
I don't quite get what the potential drawbacks of "using namespace std"
are...
i perused a few books, but most authors *do* use "using namespace std",
and the person who asked me to make the change wouldn't explain.
I was under the impression that the using keyword just lets the
compiler know where to look...
i mean, would it make a difference in code size or anything?
cheers,
G