From 16d4d2c92fdd3722862b72f14f91153f95b578e1 Mon Sep 17 00:00:00 2001 From: Reilly Grant Date: Thu, 22 Dec 2022 21:58:08 -0800 Subject: [PATCH] Fix C array syntax in memory-management/manual.md Heap-allocated arrays in C use `int*` instead of `int[]`. --- src/memory-management/manual.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/memory-management/manual.md b/src/memory-management/manual.md index ad2288ec..069ca94a 100644 --- a/src/memory-management/manual.md +++ b/src/memory-management/manual.md @@ -8,7 +8,7 @@ You must call `free` on every pointer you allocate with `malloc`: ```c void foo(size_t n) { - int[] int_array = (int*)malloc(n * sizeof(int)); + int* int_array = (int*)malloc(n * sizeof(int)); // // ... lots of code //