what is the use of Namespace in c++.

Answer Posted / ramprasad g

The use of namespace is to avoid clash during naming of
variable,classes etc.

Suppose a company wants to release its version of a
function, it can create a separate namespace and then create a
function within that namespace.Another company can create a
function of same name, as long as it is in different
namespace.And the third company can use both the functions
in the same program by using resolving the namespace.


pakage concept of Java is a similar idea.

Is This Answer Correct ?    20 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If you push the numbers (in order) 1, 3, and 5 onto a stack, which pops out first a) 1 b) 5 c) 3

969


What is prototype for that c string function?

774


Describe Trees using C++ with an example.

701


Define the process of error-handling in case of constructor failure?

656


Difference between delete and free.

716






Is C++ case sensitive a) False b) Depends on implementation c) True

695


What do the header files usually contains?

715


What is isdigit c++?

684


What is the latest c++ standard?

773


What is c++ redistributable?

718


What does iomanip mean in c++?

712


What is insertion sorting?

764


Why #include is used?

699


What is else if syntax?

772


What is linked list in c++?

783