Posts

Showing posts with the label namespace

Why do we use "Using namespace std;" in cpp

what is the use of  Namespace & What is namespace or namespace std; in c++:  it is a special feature introduced in cpp, and with its help, we can prevent duplication in the program of variables and especially of methods(Functions()) For Ex, if we working with any xyz() and it is also present in the standard library then compiler gets exerts an error to us due duplicate function in the same directory  but with the use of it, we can overcome this error  Namespaces allow us to group named entities that otherwise would have  global scope  into narrower scopes, giving them  namespace scope . This allows organizing the elements of programs into different logical scopes referred to by names. Namespaces provide the space where we can define or declare identifiers i.e. names of variables, methods, classes, etc. Why do we use using namespace std; first, we should know what is the use of it  by this, we tell the compiler that we are using all the entitie...

Pageviews