Skip to content
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

R14.1 中措辞可以改进 #57

Open
Mq-b opened this issue Dec 25, 2024 · 0 comments
Open

R14.1 中措辞可以改进 #57

Mq-b opened this issue Dec 25, 2024 · 0 comments

Comments

@Mq-b
Copy link
Contributor

Mq-b commented Dec 25, 2024

原文

使用 、->、.、->*、[]、() 等运算符,通过指针的值访问指针指向的数据称为“解引用(dereference)”。

通过指针的值访问指针指向的数据称为“解引用(dereference)” 那么问题来了,什么又叫指向?既然已经提到了“指针的值”这种如此准确的措辞,不如更加清晰一点。

A 指针对象存储着 B 对象的地址,我们就称这个 A 指针指向B对象。这是一种习惯用语。

解引用空指针属于逻辑错误

逻辑错误”更多是用户代码层面,程序员编写的视角。有必要强调在 C++ 中,这是未定义行为

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

No branches or pull requests

1 participant