Skip to content

第二章 文本错误 #120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
yangruihan opened this issue Aug 28, 2020 · 2 comments
Closed

第二章 文本错误 #120

yangruihan opened this issue Aug 28, 2020 · 2 comments
Labels

Comments

@yangruihan
Copy link
Contributor

实际描述

  • 文件路径:book/en-us/02-usability.md
  • 原文段落:
## 2.1 Constants

### nullptr

The purpose of `nullptr` appears to replace `NULL`. In a sense, 
traditional C++ treats `NULL` and `0` as the same thing, 
depending on how the compiler defines NULL, 
and some compilers define NULL as `((void*)0)` Some will define it directly as `0`.

C++ ** does not allow ** to implicitly convert `void *` to other types. 
But if the compiler tries to define `NULL` as `((void*)0)`, then in the following code:

预期描述

## 2.1 Constants

### nullptr

The purpose of `nullptr` appears to replace `NULL`. In a sense, 
traditional C++ treats `NULL` and `0` as the same thing, 
depending on how the compiler defines NULL, 
and some compilers define NULL as `((void*)0)` Some will define it directly as `0`.

C++ **does not allow** to implicitly convert `void *` to other types. 
But if the compiler tries to define `NULL` as `((void*)0)`, then in the following code:

附图

image

@changkun changkun added the typo label Aug 28, 2020
@changkun
Copy link
Owner

PR welcome

@yangruihan
Copy link
Contributor Author

PR: #121

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants