其他分享
首页 > 其他分享> > [Go] Pointer

[Go] Pointer

作者:互联网

var name string
	var namePointer *string // Pointer

	name = "Beyonce"
	namePointer = &name // Assign a Pointer

	fmt.Println("Name: ", name)
	fmt.Println("Name *: ", *namePointer) // Need to add * to get value

标签:name,fmt,var,Println,namePointer,Go,Pointer
来源: https://www.cnblogs.com/Answer1215/p/16660282.html