Skip to content

Commit

Permalink
增加一点指针的说明
Browse files Browse the repository at this point in the history
  • Loading branch information
jinzhongjia committed Dec 8, 2023
1 parent 7a844c5 commit c3e39ee
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion learn/basic/advanced_type/pointer.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ zig 的指针和 C 的指针略有不同,包含两种指针,一种单项(s

:::warning 关于指针运算

zig 本身支持指针运算,但有一点需要注意:最好将指针分配给 `[*]T` 类型后再进行计算。
zig 本身支持指针运算(加减操作),但有一点需要注意:最好将指针分配给 `[*]T` 类型后再进行计算。

尤其是在切片中,不可直接对其指针进行更改,这会破坏切片的内部结构!

Expand Down

0 comments on commit c3e39ee

Please sign in to comment.