http://play.golang.org/p/BgnHN-GikU
var p1 = new(int)
var p2 *int = new(int)
var p3 = 0
var p4 *int
func main() {
fmt.Println(*p1, &p1, p1)
fmt.Println()
fmt.Println(*p2, &p2, p2)
fmt.Println()
fmt.Println(p3, &p3)
fmt.Println()
fmt.Println(p4, &p4)
}
0 0x206a10 0x104382e0
0 0x206a14 0x104382f0
0 0x21ccc0
<nil> 0x206a18
qq_花开花谢_0
相关分类