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://t.me/niuav
牛C网:https://j1o.net
牛C网导航:https://niuc2.com
零九导航:https://09.gay
- 本文固定链接: https://niul.net/385503.html
- 转载请注明: 分享菌 于 牛C网(NiuL.Net) 发表