mirror of
https://github.com/krahets/hello-algo.git
synced 2024-12-25 00:46:30 +08:00
Update array.md (#890)
* Update array.md * Update array.md --------- Co-authored-by: Yudong Jin <krahets@163.com>
This commit is contained in:
parent
e441ee4e35
commit
356db47cd4
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue