diff options
| author | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-12-27 23:44:12 +0100 |
|---|---|---|
| committer | Chris Boesch <chrboesch@noreply.codeberg.org> | 2025-12-27 23:44:12 +0100 |
| commit | 21f86f07adf544850a7ef5f913c01117c04db147 (patch) | |
| tree | bc27ff4820a670a812195ea536cb45b0675748c5 /exercises/026_hello2.zig | |
| parent | a5febf58c9f9229bdf9e57df727fa45ea47d2fd6 (diff) | |
migrated build and test
Diffstat (limited to 'exercises/026_hello2.zig')
| -rw-r--r-- | exercises/026_hello2.zig | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/exercises/026_hello2.zig b/exercises/026_hello2.zig index 582dba9..97ea918 100644 --- a/exercises/026_hello2.zig +++ b/exercises/026_hello2.zig @@ -15,8 +15,12 @@ const std = @import("std"); // https://ziglang.org/documentation/master/#Inferred-Error-Sets // pub fn main() !void { + // We need an io instance for I/O operations; + // we'll learn how to create them later. + const io = std.Options.debug_io; + // We get a Writer for Standard Out so we can print() to it. - var stdout = std.fs.File.stdout().writer(&.{}); + var stdout = std.Io.File.stdout().writer(io, &.{}); // Unlike std.debug.print(), the Standard Out writer can fail // with an error. We don't care _what_ the error is, we want |
