0
What is the meaning of namespace?
2 ответов
+ 3
You can always use search bar (both Google's or sololearn's) to get the answer👇
https://www.sololearn.com/discuss/485399/?ref=app
https://www.sololearn.com/discuss/954285/?ref=app
https://www.sololearn.com/discuss/57539/?ref=app
https://www.sololearn.com/discuss/93433/?ref=app
https://www.sololearn.com/discuss/187690/?ref=app
https://www.sololearn.com/discuss/462764/?ref=app
https://www.sololearn.com/discuss/101981/?ref=app
https://www.sololearn.com/discuss/450872/?ref=app
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