Values & References13 / 18
Up next

Pointer to an array

const std = @import("std");

pub fn main() void {
    var arr = [_]i32{ 1, 2, 3 };
    // *[3]i32 remembers the length, unlike a slice
    const p: *[3]i32 = &arr;
    p[0] = 100;
    std.debug.print("{any}\n", .{arr});
}
What you're solving

*[N]T keeps the length in the type