CLI Arguments
To access command-line arguments, use the iterator provided by the standard library.
zig var args = try std.process.argsWithAllocator(allocator); defer args.deinit();
while (args.next()) |arg| { std.debug.print("Arg: {s}\n", .{arg}); }
Full Course: Zig Programming From Zero to Hero
To access command-line arguments, use the iterator provided by the standard library.
zig var args = try std.process.argsWithAllocator(allocator); defer args.deinit();
while (args.next()) |arg| { std.debug.print("Arg: {s}\n", .{arg}); }