概述swap 概述 & 取地址 取值 swappackage mainimport "fmt"func swap(a *int,b*int){ t:=*a *a = *b *b =t}func main() { a,b :=10,20 fmt.Println("a=",a,"b=",b) swap(&a,&b) fmt.Println("a=",a,"b=",b)} a= 10 b= 20a= 20 b= 10