mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-08 07:50:00 +00:00
12 lines
400 B
Diff
12 lines
400 B
Diff
--- exercises/067_comptime2.zig 2026-05-04 15:38:52.565144012 +0200
|
|
+++ answers/067_comptime2.zig 2026-05-04 15:37:20.257213463 +0200
|
|
@@ -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 = @splat('A');
|