PDA

View Full Version : what is difference between Data Members and Members function.



saneha
05-02-2011, 06:30 AM
what is difference between Data Members and Members function.

Vuhelper
05-02-2011, 06:31 AM
Namespaces allows us to group a set of global classes, objects and/or functions under a name. If you specify using namespace std then you don't have to put std:: throughout your code. The program will know to look in the std library to find the object. Namespace std contains all the classes, objects and functions of the standard C++ library.
The whole idea of namespaces was to define a new level of scope. Sometimes different libraries and include files have the same global variable or function names. For example, a socket library might define a global variable called max_connections to indicate max socket connections allowed. A database library may declare a global variable with the same name to indicate max connections to a database. This causes problems when a programmer wishes to use both libraries in a program. The concept of namespaces was put forward to solve this problem explicitly.