```
package main
import "fmt"
type Color int
func main() {
c := new([]int)
fmt.Println(c)
c[1] = 2
}
```
c := new([]int) 可以创建成功,但是怎么用呢
c[1] = 2
.\point.go:11: invalid operation: c[1] (type *[]int does not support indexing)
有疑问加站长微信联系(非本文作者)