<分区>
我想为二维数组分配空间,而且我想以干净的方式进行。
address [10]int
myLength := len(address)
// 1. but this not work at all
matrix := [myLength][myLength]byte
// 2. and this initializes 10 arrays with length 0
matrix := make([][]int, myLength, myLength)
第一次尝试时出现错误:
non-constant array bound l