diff options
| author | Ibrahim Muftee <ibrahim@muftee.net> | 2026-06-29 15:11:40 -0500 |
|---|---|---|
| committer | Ibrahim Muftee <ibrahim@muftee.net> | 2026-06-29 15:15:14 -0500 |
| commit | bdfe3df2947f8787c8a4ef8c534f6a8932e13871 (patch) | |
| tree | f2df9a5f56b6c7f95c0978a861cb0ecf60560391 /exercises/037_structs.zig | |
| parent | d093f37e1e4c5aed4a4c8d4999001134aec251ca (diff) | |
feat: begin solving exercises
Diffstat (limited to 'exercises/037_structs.zig')
| -rw-r--r-- | exercises/037_structs.zig | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/exercises/037_structs.zig b/exercises/037_structs.zig index c345faf..a7a9a2f 100644 --- a/exercises/037_structs.zig +++ b/exercises/037_structs.zig @@ -33,6 +33,7 @@ const Role = enum { // Please add a new property to this struct called "health" and make // it a u8 integer type. const Character = struct { + health: u8, role: Role, gold: u32, experience: u32, @@ -41,6 +42,7 @@ const Character = struct { pub fn main() void { // Please initialize Glorp with 100 health. var glorp_the_wise = Character{ + .health = 100, .role = Role.wizard, .gold = 20, .experience = 10, |
