"Teddy" <du********@hotmail.com> wrote in message
news:11**********************@g47g2000cwa.googlegr oups.com...
If I use just a STL container such as std::vector in my program.
Is "using std::vector;" better than "using namespace std" ?
Does "using namespace std" cost ?
Some, including me, would say that using std::vector (or is that using
namespace std:vector?) is better than using namespace std. Personally, I
don't use the using clause at all and just put std:: in front of everything
from the std namespace.
As for the "cost", the cost only comes at compile time, when you compile it.
It doesnt' effect run time whatsoever. It's just for name resolution during
compile.