What problem does the namespace feature solve?

Answer Posted / nimish singh

Multiple providers of libraries might use common global identifiers causing a name collision when an application tries to link with two or more such libraries. The namespace feature surrounds a library's external declarations with a unique namespace that eliminates the potential for those collisions.

This solution assumes that two library vendors don't use the same namespace identifier, of course.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the difference between while and do while loop?

550


How many ways can a variable be initialized into in C++?

591


If dog is a friend of boy, and terrier derives from dog, is terrier a friend of boy?

605


What is constructor in C++?

621


What are the benefits of oop in c++?

582






When can I use a forward declaration?

616


Evaluate as true or false: !(1 &&0 || !1) a) True b) False c) Invalid statement

624


Evaluate !(1&&1||1&&0) a) Error b) False c) True

696


How do you clear a map in c++?

565


What is name hiding in c++?

604


What do you mean by function pointer?

587


Difference between pass by value and pass by reference?

591


What is scope operator in c++?

558


what is multi-threading in C++?

608


Explain the concept of dynamic allocation of memory?

612