221V 9 hours ago
parent
commit
74eef2c6ef
1 changed files with 12 additions and 11 deletions
  1. 12 11
      exercises/061_coercions.zig

+ 12 - 11
exercises/061_coercions.zig

@@ -64,15 +64,16 @@
 
 const print = @import("std").debug.print;
 
-pub fn main() void {
-    var letter: u8 = 'A';
-
-    const my_letter:   ???   = &letter;
-    //               ^^^^^^^
-    //           Your type here.
-    // Must coerce from &letter (which is a *u8).
-    // Hint: Use coercion Rules 4 and 5.
-
-    // When it's right, this will work:
-    print("Letter: {u}\n", .{my_letter.?.*[0]});
+pub fn main() void{
+  var letter: u8 = 'A';
+  
+  const my_letter: ?*[1]u8 = &letter;
+  //               ^^^^^^^
+  //           Your type here.
+  // Must coerce from &letter (which is a *u8).
+  // Hint: Use coercion Rules 4 and 5.
+  
+  // When it's right, this will work:
+  print("Letter: {u}\n", .{my_letter.?.*[0]});
 }
+