Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit63e435a

Browse files
committed
resolvechangkun#10, 修复 typo 错误
1 parent8317c2b commit63e435a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

‎README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
笔者时间和水平有限,如果读者发现书中内容的错误,欢迎提[issue](https://github.com/changkun/cpp1x-tutorial/issues)。并感谢以下读者指出本书中出现的错误:
4141

42-
[Recolic Keghart](https://www.gitbook.com/@recolic),[sinomiko](https://www.gitbook.com/@sinomiko),[Wang Zhenhua](https://www.gitbook.com/@jackwish),[asm warrior](https://www.gitbook.com/@asmwarrior),[garicc](https://www.gitbook.com/@ihpy),[Wenhan Jiang](https://www.gitbook.com/@jiangwenhan),[liang xiao](https://www.gitbook.com/@liangx8),[slivermeteor](https://github.com/slivermeteor),[inkedawn](https://github.com/inkedawn),[zhaoyao73](https://github.com/zhaoyao73)
42+
[Recolic Keghart](https://www.gitbook.com/@recolic),[sinomiko](https://www.gitbook.com/@sinomiko),[Wang Zhenhua](https://www.gitbook.com/@jackwish),[asm warrior](https://www.gitbook.com/@asmwarrior),[garicc](https://www.gitbook.com/@ihpy),[Wenhan Jiang](https://www.gitbook.com/@jiangwenhan),[liang xiao](https://www.gitbook.com/@liangx8),[slivermeteor](https://github.com/slivermeteor),[inkedawn](https://github.com/inkedawn),[zhaoyao73](https://github.com/zhaoyao73),[sundy-li](https://github.com/sundy-li),[dontpanic92](https://github.com/dontpanic92)
4343

4444
##许可
4545

‎book/02-usability.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void foo(char*);
2323
void foo(int);
2424
```
2525
26-
那么 `foo(NULL);` 这个语句将会去调用 `foo(int)`,从而导致代码违反直观
26+
那么 `foo(NULL);` 这个语句将会去调用 `foo(int)`,从而导致代码违反直觉
2727
2828
为了解决这个问题,C++11 引入了 `nullptr` 关键字,专门用来区分空指针、0。而 `nullptr` 的类型为 `nullptr_t`,能够隐式的转换为任何指针或成员指针的类型,也能和他们进行相等或者不等的比较。
2929
@@ -111,7 +111,7 @@ int main() {
111111
112112
在 C++11 之前,可以在常量表达式中使用的变量必须被声明为 `const`,在上面代码中,`len_2` 被定义成了常量,因此 `len_2` 是一个常量表达式,所以能够合法的分配一个数组;而对于 `arr_5` 来说,C++98 之前的编译器无法得知 `len_foo()` 在运行期实际上是返回一个常数,这也就导致了非法的产生。
113113
114-
> 注意,现在大部分编译器其实都带有自身编译优化,很多非法行为在编译器优化的加持下回变得合法,若需重现编译报错的现象需要使用老版本的编译器。
114+
> 注意,现在大部分编译器其实都带有自身编译优化,很多非法行为在编译器优化的加持下会变得合法,若需重现编译报错的现象需要使用老版本的编译器。
115115
116116
117117
C++11 提供了 `constexpr` 让用户显式的声明函数或对象构造函数在编译器会成为常数,这个关键字明确的告诉编译器应该去验证 `len_foo` 在编译器就应该是一个常数。
@@ -716,7 +716,7 @@ void printf(T0 t0, T... t) {
716716
717717
**2. 初始化列表展开**
718718
719-
> 这个方法需要之后介绍的知识,读者可以简单阅读以下,将这个代码段保存,在后面的内容了解过了之后再回过头来阅读此处方法会大有收获。
719+
> 这个方法需要之后介绍的知识,读者可以简单阅读一下,将这个代码段保存,在后面的内容了解过了之后再回过头来阅读此处方法会大有收获。
720720
721721
递归模板函数是一种标准的做法,但缺点显而易见的在于必须定义一个终止递归的函数。
722722

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp