diff --git a/zig.md b/zig.md index ad56a471..efebbf8b 100644 --- a/zig.md +++ b/zig.md @@ -204,7 +204,7 @@ const slice = array[0..array.len]; // "slice" represents the whole array. ```zig // Pointer on a value can be created with "&". const x: i32 = 1; -const pointer: *i32 = &x; // "pointer" is a pointer on the i32 var "x". +const pointer: *const i32 = &x; // "pointer" is a pointer on the const i32 var "x". print("1 = {}, {}\n", .{x, pointer}); // Pointer values are accessed and modified with ".*".