This website works better with JavaScript
Acasă
Explorează
Ajutor
Autentificare
nice-repo-share
/
the-way-to-go_ZH_CN
oglindă de
https://github.com/Unknwon/the-way-to-go_ZH_CN.git
Urmărește
2
Stea
0
Bifurcare
0
Fisiere
Probleme
0
Wiki
Arbore:
1573212775
Ramuri
Etichete
master
the-way-to-go_Z...
/
eBook
/
16.4.md
16.4.md
485 B
Istoric
Crud
16.4 何时使用 new() 和 make()
在第
7.2.1 小节
和第
10.2.2 小节
,我们已经讨论过此问题,并使用代码进行详细说明,观点如下:
- 切片、映射和通道,使用 make() - 数组、结构体和所有的值类型,使用 new()
链接
目录
上一节:
发生错误时使用 defer 关闭一个文件
下一节:
不需要将一个指向切片的指针传递给函数