0

What is the meaning of namespace?

3rd Sep 2020, 5:24 AM
Pratik Naik
Pratik Naik - avatar
2 ответов
0
The main aim of namespace is using same name functions of different libraries. For example you create some library and write function sum(a,b) where a and b are integers. Your friend write some other library with function sum(a,b) the same args but other implementation inside it. So when you include header of both libraries, compilator gives error since it is not know which of sum function need to use. Therefore using namespace avoid such situation
3rd Sep 2020, 6:03 AM
george
george - avatar