Sololearn: Learn to Code
New course! Every coder should learn Generative AI!
Try a free lesson
+ 3
Namespaces allow you to encapsulate code so that you don't have your code get cluttered. Say for example that you included the standard math library and another third party math library. If both libraries implement the sqrt function, which one should be called? Normally this causes the compiler to fail but including namespaces means you circumvent this problem.
21st Dec 2016, 10:14 AM
James Durand
James Durand - avatar