点击运行
package main import ( "fmt" ) func hello() *int { i := 5 return &i } func main() { d := hello() fmt.Println("变量 d 的值为:", *d) }
运行结果 :
正在执行...