diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-12-28 14:46:23 +0100 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-12-28 14:46:23 +0100 |
| commit | 8f9daa12b27323c3151bc652a111126a56f21216 (patch) | |
| tree | 379860b4bdd890bd3324cb9e417f7d016210c360 /exercises/034_quiz4.zig | |
| parent | 8e30debc6aa05a9313a085ba52b38d5c7224a7ea (diff) | |
exc. 34 migrated
Diffstat (limited to 'exercises/034_quiz4.zig')
| -rw-r--r-- | exercises/034_quiz4.zig | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/exercises/034_quiz4.zig b/exercises/034_quiz4.zig index 8704397..28f2291 100644 --- a/exercises/034_quiz4.zig +++ b/exercises/034_quiz4.zig @@ -6,15 +6,17 @@ // my_num=42 // const std = @import("std"); +const io = std.Options.debug_io; const NumError = error{IllegalNumber}; pub fn main() void { - var stdout = std.fs.File.stdout().writer(&.{}); + var stdout_writer = std.Io.File.stdout().writer(io, &.{}); + const stdout = &stdout_writer.interface; const my_num: u32 = getNumber(); - try stdout.interface.print("my_num={}\n", .{my_num}); + try stdout.print("my_num={}\n", .{my_num}); } // This function is obviously weird and non-functional. But you will not be changing it for this quiz. |
