From 356db47cd4b2c182d8f62de2cb78b87c7b0f691d Mon Sep 17 00:00:00 2001 From: syd168 Date: Thu, 26 Oct 2023 22:22:19 +0800 Subject: [PATCH] Update array.md (#890) * Update array.md * Update array.md --------- Co-authored-by: Yudong Jin --- docs/chapter_array_and_linkedlist/array.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 };