Skip to content

Commit 5c9a876

Browse files
authored
更新 04-指针与引用-理解内存与地址.md
1 parent 0c091e2 commit 5c9a876

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

docs/cpp/04-指针与引用-理解内存与地址.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,10 @@ int main() {
129129
return 0;
130130
}
131131
```
132+
int& r = x;
133+
这是重点。
134+
- int& 表示 引用类型
135+
- r 是 x 的引用,可以理解为:r 是 x 的别名
132136

133137
你会看到 `x``r` 永远同步变化,因为它们是同一块数据。
134138

0 commit comments

Comments
 (0)