#how to have allocator as a function arg?
1 messages · Page 1 of 1 (latest)
Allocator is a type defined within std, so you have to import it (std) and then use it as std.Allocator
const std = @import("std");
fn ensure_input(a: std.Allocator, day: usize) !EnsureInputErrors {
src/main.zig:7:23: error: root source file struct 'std' has no member named 'Allocator'