You've already forked comprehensive-rust
mirror of
https://github.com/google/comprehensive-rust.git
synced 2025-06-16 22:27:34 +02:00
Fix C array syntax in memory-management/manual.md
Heap-allocated arrays in C use `int*` instead of `int[]`.
This commit is contained in:
@ -8,7 +8,7 @@ You must call `free` on every pointer you allocate with `malloc`:
|
|||||||
|
|
||||||
```c
|
```c
|
||||||
void foo(size_t n) {
|
void foo(size_t n) {
|
||||||
int[] int_array = (int*)malloc(n * sizeof(int));
|
int* int_array = (int*)malloc(n * sizeof(int));
|
||||||
//
|
//
|
||||||
// ... lots of code
|
// ... lots of code
|
||||||
//
|
//
|
||||||
|
Reference in New Issue
Block a user