Update array.md (#890)

* Update array.md

* Update array.md

---------

Co-authored-by: Yudong Jin <krahets@163.com>
pull/895/head
syd168 1 year ago committed by GitHub
parent e441ee4e35
commit 356db47cd4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -24,7 +24,7 @@
/* 初始化数组 */ /* 初始化数组 */
// 存储在栈上 // 存储在栈上
int arr[5]; 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* arr1 = new int[5];
int* nums1 = new int[5] { 1, 3, 2, 5, 4 }; int* nums1 = new int[5] { 1, 3, 2, 5, 4 };

Loading…
Cancel
Save