docs(string): fixed typo #19

This commit is contained in:
ruanyf
2021-09-09 16:12:52 +08:00
parent 1aef769e3f
commit 2603e13338

View File

@@ -136,7 +136,7 @@ s[0] = 'z';
为了提醒用户,字符串声明为指针后不得修改,可以在声明时使用`const`说明符,保证该字符串是只读的。
```c
const char* s = "ello, world!";
const char* s = "Hello, world!";
```
上面字符串声明为指针时,使用了`const`说明符,就保证了该字符串无法修改。一旦修改,编译器肯定会报错。