指针*
,引用&
,解引用*
,取地址&
&
可以作为取地址
用。&a
返回取a
的地址,a
是一个对象。&
映射对象到地址。
In this case, &
can be called Address of
operator.
*
可以作为解引用
操作符。*p
返回p
所指向的对象,p
是一个地址。*
映射地址到对象。
In this case, *
can be called Indirection
operator. Indirection
operator returns the value
of the variable located at the address specified by its operand.
Indirection
operator *
is the complement of Address of
operator &
.
References: