首先给出一张符号中英对照术语表:
中文 | English | 符号 |
---|---|---|
引用 | reference | & |
取地址 | address-of | & |
指针 | pointer | * |
解引用 | dereference | * |
常量 | constant | const |
自动类型 | automatic | auto |
常量表达式 | constant expression | constexpr |
空 | void | void |
这里想给出一些自己的理解,似乎与书上的视角略有不同,着重关注计算机实现部分的一些规律:
-
const int
和int const
是可以互换的,最终在计算机里会把const
“左移化”,变成const int