diff options
author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2023-02-21 21:54:09 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-21 21:54:09 +0100 |
commit | c34380e939386d390f99a4f2d020fbd086988faa (patch) | |
tree | 91ba1b1985a88d275016ccc7d1531265c6fa9907 /exercises/038_structs2.zig | |
parent | 8da0a6aa7d276bd11db017ac8f809c8692314fc5 (diff) | |
parent | e7326dc5f92dd8a2dc8bd7cafb5b3eaaf55ce99b (diff) |
Merge pull request #191 from chrboesch/dev_1711
dev.1711 - switched to multi-object-for-loops
Diffstat (limited to 'exercises/038_structs2.zig')
-rw-r--r-- | exercises/038_structs2.zig | 2 |
1 files changed, 1 insertions, 1 deletions
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, }); |