"using namespace" potential problems

Hey all! Hope everyone is enjoying the course so far, just here to talk about the issues that could arise from the ‘using namespace’ command. So the advantage to using this command is that it eliminates the need for unnecessary typing, however this comes with the risk of duplicate locations. For example, if multiple libraries, or even namespaces within the same library, etc. contain an identifier like cout for example we run into the issue that the compiler will have no idea what to do with the code and we end up with an error. At least to my understanding

1 Like