Bruce Eckel's Thinking in C++, 2nd Ed Contents | Prev | Next

Use of namespaces

[More detail will be given here]. In header files, any “pollution” of the namespace in which the header is included must be scrupulously avoided, so no using declarations of any kind are allowed outside of function definitions.

In cpp files, any global using definitions will only affect that file, and so they are generally used for ease of reading and writing code, especially in small programs.

Contents | Prev | Next


Contact: webmaster@codeguru.com
CodeGuru - the website for developers.
[an error occurred while processing this directive]