I am confused. In part 3.8 of Bjarne Stroustrup's book 'Programming Principles and Practice Using C++' he talks about types of objects. I cite the following list:
- A type defines a set of possible values and a set of operations (for an object).
- An object is some memory that holds a value of a given type.
- A value is a set of bits in memory interpreted according to a type.
- A variable is a named object.
- A declaration is a statement that gives a name to an object.
- A definition is a declaration that sets aside memory for an object.
From his explanation of definition I understand that no memory is set aside for an object during declaration. However, the fact that Bjarne mentions that declaration involves the naming of an object, suggests that memory is actually set aside, as objects are explained as being
some memory that holds a value of a given type.
Can someone clarify this?