point
package main
import (
"fmt"
_ "strconv"
)
func main() {
var poi *int32
var song int32 = 123123
poi = &song
fmt.Println(*poi)
fmt.Print(poi)
}
123123
0xc00000c1b8成功: 进程退出代码 0
指针取值 * 类似于c++
package main
import (
"fmt"
_ "strconv"
)
func main() {
var poi *int32
var song int32 = 123123
poi = &song
fmt.Println(*poi)
fmt.Print(poi)
}
123123
0xc00000c1b8成功: 进程退出代码 0
指针取值 * 类似于c++