quote:
Original post by navigator
Isn''t it possible to get rid of ''std::'' everywhere by using the ''using namespace std'' declaration in the code?
Yes, but it''s a bad idea.
The objective of namespaces was to componentize functions and prevent function names, etc from clashing. If you blindly import the entire namespace with the using directive, then you''ve negated all the advantages of namespaces.
You can use the using directive at any scope - inside functions, etc, so you can minimize the level of namespace collisions. And since it''s resolved at compile time, it has no performance drawbacks.
[
GDNet Start Here |
GDNet Search Tool |
GDNet FAQ |
MS RTFM [MSDN] |
SGI STL Docs |
Google! ]
Thanks to Kylotan for the idea!