What problem does the namespace feature solve?
Answer / 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 |
What does override mean in c++?
Does c++ have finally?
What are the different data types present in C++?
Write about the role of c++ in the tradeoff of safety vs. Usability?
class X { public: int x; static void f(int z); }; void X::f(int y) {x=y;} What is the error in the sample code above? a) The class X does not have any protected members. b) The static member function f() accesses the non-static z. c) The static member function f() accesses the non-static x. d) The member function f() must return a value. e) The class X does not have any private members.
What is a loop? What are different types of loops in c++?
What is constructor c++?
Write an algorithm that determines whether or not an almost complete binary tree is a heap.
What is flush c++?
If a base class declares a function to be virtual, and a derived class does not use the term virtual when overriding that class, is it still virtual when inherited by a third-generation class?
What are the characteristics of friend functions?
What is the use of volatile variable?