Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
In this section, I will generalize the notion of a class data member. Conceptually, a class is a blueprint for objects. The class specification describes what each object of that class has: data and functions.
This is why when you create an instance of a class object, a separate set of data members is created for that object. This happens no matter how you create the object, either through a definition of an object as a local or a global named variable, with the new operator as an unnamed dynamic variable, passing an object by value as a function parameter, or returning an object from a function by value. Each object instance has its own set of data member values: private, public, or protected.