mirror of
https://codeberg.org/andyscott/ziglings.git
synced 2024-11-13 21:40:46 -05:00
11 lines
404 B
Diff
11 lines
404 B
Diff
--- exercises/067_comptime2.zig 2023-11-21 14:36:12.080295365 +0100
|
|
+++ answers/067_comptime2.zig 2023-11-21 15:11:50.814098876 +0100
|
|
@@ -35,7 +35,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;
|