What is the purpose of using namespace

Why do we use namespace in c++?

1 Like

Namespaces are used to organize code into logical groups and to prevent name collisions that can occur especially when your code base includes multiple libraries .