koushr
koushr

func main() { s := "脑子进煎鱼了" fmt.Printf("main 内存地址:%p\n", &s) hello(&s) } func hello(s *string) { fmt.Printf("hello 内存地址:%p\n", &s) }
func main() { s := "脑子进煎鱼了" fmt.Printf("main 内存地址:%p\n", &s) hello(&s) } func hello(s *string) { fmt.Printf("hello 内存地址:%p\n", &s) }
func main() { s := "脑子进煎鱼了" fmt.Printf("main 内存地址:%p\n", &s) hello(&s) } func hello(s *string) { fmt.Printf("hello 内存地址:%p\n", &s) } hello里面不应该是这样打印吗? fmt.Printf("hello 内存地址:%p\n", s) 这样打印出来结果是一样的