mirror of
https://github.com/wangdoc/clang-tutorial.git
synced 2026-02-03 10:53:37 +08:00
docs(specifier): edit const
This commit is contained in:
@@ -17,7 +17,7 @@ PI = 3; // 报错
|
||||
|
||||
```c
|
||||
const int arr[] = {1, 2, 3, 4};
|
||||
arr[0] = 5;
|
||||
arr[0] = 5; // 报错
|
||||
```
|
||||
|
||||
上面示例中,`const`使得数组`arr`的成员无法修改。
|
||||
|
||||
Reference in New Issue
Block a user