Explanation of namespace clashes

The risk of the “using” function is that two libraries could have the same namespace or the same function within a namespace. Depending on what libraries you have included, you could end up with what is called a “namespace clash,” in which the compiler gets confused between two namespaces or namespace functions with the same name. This will cause errors. You should always be very careful with the “using” function, for this reason. This does not happen if you specify the namespace from the library you have included, and the namespace has a unique name.

Privacy & Terms