mirror of
https://codeberg.org/ziglings/exercises.git
synced 2025-12-27 16:05:37 +00:00
12 lines
404 B
Diff
12 lines
404 B
Diff
--- exercises/067_comptime2.zig 2025-12-07 22:51:24.396031248 +0100
|
|
+++ answers/067_comptime2.zig 2025-12-07 22:50:18.721616293 +0100
|
|
@@ -36,7 +36,7 @@
|
|
// In this contrived example, we've decided to allocate some
|
|
// arrays using a variable count! But something's missing...
|
|
//
|
|
- var count = 0;
|
|
+ comptime var count = 0;
|
|
|
|
count += 1;
|
|
const a1: [count]u8 = .{'A'} ** count;
|