ophunter:
func testMatrix(res *[][]int) {
r := *res
r = append(r, []int{1, 2, 3})
}
fun main(){
res := make([][]int, 0)
testMatrix(&res)
fmt.Println(res)
}
这个 res 为啥是空的 []
from V2EX-最新主题 https://ift.tt/k6NzDgw
- 本文固定链接: https://niul.net/385503.html
- 转载请注明: 分享菌 于 牛叻网(NiuL.Net) 发表