namespace
s are particularly useful in large-scale applications that use many class libraries. In such cases, there’s a higher likelihood of naming conflicts. When working on such projects, there should never be a using
directive in a header. Having one brings the corresponding names into any file that includes the header. This could result in name collisions and subtle, hard-to-find errors. Instead, use only fully qualified names in headers (for example, std::cout
or std::string
).
3.133.154.64