Re: CArray help
On Sun, 9 May 2010 20:19:26 -0400, "RB" <NoMail@NoSpam> wrote:
Hey thanks for the reply! I got that at
http://www.codeguru.com/cpp/cpp/cpp_mfc/stl/article.php/c4027/A-Beginners-Tutorial-For-stdvector-Part-1.htm
about one page or so down it says
"This is okay for small projects, as long as you write the using directive in your cpp file. Never write a using directive into a
header file! This would bloat the entire namespace std into each and every cpp file that includes that header. For larger projects,
it is better to explicitly qualify every name accordingly. I am not a fan of such shortcuts. In this article, I will qualify each
name accordingly. I will introduce some typedefs in the examples where appropriate-for better readability."
The "bloating" they're talking about brings all the type, variable,
function, and other scoped names declared by the namespace into the scope
of the using-directive. This can lead to ambiguity and naming conflicts.
See the FAQ for more on why it's bad:
http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.5
--
Doug Harrison
Visual C++ MVP