diff --git a/docs/chapter_array_and_linkedlist/array.md b/docs/chapter_array_and_linkedlist/array.md index e67960ed2..99a1bcb5a 100755 --- a/docs/chapter_array_and_linkedlist/array.md +++ b/docs/chapter_array_and_linkedlist/array.md @@ -24,7 +24,7 @@ /* 初始化数组 */ // 存储在栈上 int arr[5]; - int nums[5] { 1, 3, 2, 5, 4 }; + int nums[5] = { 1, 3, 2, 5, 4 }; // 存储在堆上(需要手动释放空间) int* arr1 = new int[5]; int* nums1 = new int[5] { 1, 3, 2, 5, 4 };