OSDN Git Service
(root)
/
oi-wiki
/
main.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
368f690
)
fix:(lang/const): 修复 typo
author
Margatroid
<i@margatroid.xyz>
Sat, 7 Sep 2019 02:33:47 +0000
(10:33 +0800)
committer
GitHub
<noreply@github.com>
Sat, 7 Sep 2019 02:33:47 +0000
(10:33 +0800)
应直接使用 b
docs/lang/const.md
patch
|
blob
|
history
diff --git
a/docs/lang/const.md
b/docs/lang/const.md
index
0a2c5de
..
c94058b
100644
(file)
--- a/
docs/lang/const.md
+++ b/
docs/lang/const.md
@@
-36,7
+36,7
@@
int &r1 = a;
r1 = 1;
const int &r2 = a;
// r2 = 2; // 报错,不能通过常引用修改变量
-// int &p3 =
&
b; // 报错,不能用普通引用指向 const 变量
+// int &p3 = b; // 报错,不能用普通引用指向 const 变量
const int &r4 = b;
```