From e7326dc5f92dd8a2dc8bd7cafb5b3eaaf55ce99b Mon Sep 17 00:00:00 2001 From: Chris Boesch Date: Tue, 21 Feb 2023 21:43:40 +0100 Subject: dev.1711 - switched to multi-object-for-loops --- exercises/038_structs2.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exercises/038_structs2.zig') diff --git a/exercises/038_structs2.zig b/exercises/038_structs2.zig index 4f2ce48..af7eb1f 100644 --- a/exercises/038_structs2.zig +++ b/exercises/038_structs2.zig @@ -44,7 +44,7 @@ pub fn main() void { // it do and why? // Printing all RPG characters in a loop: - for (chars) |c, num| { + for (chars, 0..) |c, num| { std.debug.print("Character {} - G:{} H:{} XP:{}\n", .{ num + 1, c.gold, c.health, c.experience, }); -- cgit v1.2.3-70-g09d2