![]() |
![]() |
![]() |
![]() |
![]() |
|
The definition, cylinder *cptr; makes cptr a pointer
variable, and the chunk of memory allocated for cptr contains the
address of a chunk of memory allocated for a cylinder object.
Thereafter, cptr, without a dereferencing asterisk, refers to the
location of the address; *cptr, with a dereferencing asterisk,
refers to the location of the cylinder object identified by the
address. Said more concisely, cptr's value is an address, whereas
*cptr's value is a cylinder object.