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

Rust 用法 #10

Open
scarletttt opened this issue Jan 11, 2021 · 0 comments
Open

Rust 用法 #10

scarletttt opened this issue Jan 11, 2021 · 0 comments

Comments

@scarletttt
Copy link
Owner

raw pointer:Rust语言中存在的两个裸指针即const T 和mut T,裸指针可以为null。在Rust语言中对裸指针的创建是安全safe的,而对裸指针的读写是不安全unsafe的。裸指针又可以分为可变、不可变,分别写作 *mut T 和 *const T,这里的 T 表示指针指向的具体类型,裸指针本身的的类型大小与 usize一致。

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