package main import "fmt" func f(s *string) (string, string) { *s = "def" return "hello", *s } func main() { s := "abc" a, b := f(&s) fmt.Println(a, b) } hello def
go 指针
猜你喜欢
转载自xiangjie88.iteye.com/blog/2383772
今日推荐
周排行