aboutsummaryrefslogtreecommitdiff
path: root/exercises/43_pointers5.zig
diff options
context:
space:
mode:
Diffstat (limited to 'exercises/43_pointers5.zig')
-rw-r--r--exercises/43_pointers5.zig3
1 files changed, 1 insertions, 2 deletions
diff --git a/exercises/43_pointers5.zig b/exercises/43_pointers5.zig
index adfaea1..dc178ec 100644
--- a/exercises/43_pointers5.zig
+++ b/exercises/43_pointers5.zig
@@ -44,7 +44,7 @@ const Class = enum{
const Character = struct{
class: Class,
gold: u32,
- health: u8,
+ health: u8 = 100, // <--- You can also fields a default value!
experience: u32,
};
@@ -52,7 +52,6 @@ pub fn main() void {
var glorp = Character{
.class = Class.wizard,
.gold = 10,
- .health = 100,
.experience = 20,
};