forked from ffhelicopter/Go42
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ffhelicopter#17 from fuzhy/patch-1
Update 42_11_array.md
- Loading branch information
Showing
1 changed file
with
2 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ var arrName = [5]string{3: "Chris", 4: "Ron"} //指定索引位置初始化 | |
// {"","","","Chris","Ron"} | ||
var arrCount = [4]int{500, 2: 100} //指定索引位置初始化 {500,0,100,0} | ||
var arrLazy = [...]int{5, 6, 7, 8, 22} //数组长度初始化时根据元素多少确定 | ||
var arrPack = [...]int{10, 5: 100} //指定索引位置初始化,数组长度与此有关 {10,0,0,0,100} | ||
var arrPack = [...]int{10, 5: 100} //指定索引位置初始化,数组长度与此有关 {10,0,0,0,0,100} | ||
var arrRoom [20]int | ||
var arrBed = new([20]int) | ||
``` | ||
|
@@ -120,4 +120,4 @@ println(arrRoom == arrBed) //true | |
>本书《Go语言四十二章经》内容在简书同步地址: https://www.jianshu.com/nb/29056963 | ||
> | ||
>虽然本书中例子都经过实际运行,但难免出现错误和不足之处,烦请您指出;如有建议也欢迎交流。 | ||
>联系邮箱:[email protected] | ||
>联系邮箱:[email protected] |