mirror of
https://codeberg.org/ziglings/exercises.git
synced 2026-06-10 00:50:00 +00:00
12 lines
420 B
Diff
12 lines
420 B
Diff
--- exercises/099_memory_allocation.zig 2025-08-15 15:17:57.839348063 +0200
|
|
+++ answers/099_memory_allocation.zig 2026-04-03 13:09:47.403580391 +0200
|
|
@@ -64,7 +64,7 @@
|
|
const allocator = arena.allocator();
|
|
|
|
// allocate memory for this array
|
|
- const avg: []f64 = ???;
|
|
+ const avg: []f64 = try allocator.alloc(f64, arr.len);
|
|
|
|
runningAverage(arr, avg);
|
|
std.debug.print("Running Average: ", .{});
|