1
0
Fork 0
mirror of https://codeberg.org/ziglings/exercises.git synced 2025-06-08 10:07:01 +09:00

Update exercises/045_optionals.zig

Add '?' in the print to silence compiler error: '@compileError("cannot format optional without a specifier (i.e. {?} or {any})");'
This commit is contained in:
vanillaiice 2024-05-10 07:26:09 +00:00
parent dfdaf03d99
commit d646af4390

View file

@ -31,7 +31,7 @@ pub fn main() void {
// integer value from deepThought() OR the number 42:
const answer: u8 = result;
std.debug.print("The Ultimate Answer: {}.\n", .{answer});
std.debug.print("The Ultimate Answer: {?}.\n", .{answer});
}
fn deepThought() ?u8 {