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