From a8af55b0a3714e32d0939743b8c53840b72f18e7 Mon Sep 17 00:00:00 2001 From: Ziqiu Zhao <39512431+ZzqiZQute@users.noreply.github.com> Date: Fri, 18 Feb 2022 10:51:09 +0800 Subject: [PATCH] fix: typo --- contents/basic/converse.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contents/basic/converse.md b/contents/basic/converse.md index 9e4117d9..68b92a52 100644 --- a/contents/basic/converse.md +++ b/contents/basic/converse.md @@ -43,7 +43,7 @@ fn main() { let mut values: [i32; 2] = [1, 2]; let p1: *mut i32 = values.as_mut_ptr(); let first_address = p1 as usize; // 将p1内存地址转换为一个整数 -let second_address = first_address + 4; // 4 == std:mem::size_of::(),i32类型占用4个字节,因此将内存地址 + 4 +let second_address = first_address + 4; // 4 == std::mem::size_of::(),i32类型占用4个字节,因此将内存地址 + 4 let p2 = second_address as *mut i32; // 访问该地址指向的下一个整数p2 unsafe { *p2 += 1;