package main
import "fmt"
func main() {
v := Vertex{5, 2}
fmt.Println(v.X)
fmt.Println(v.Y)
}
type Vertex struct {
X int
Y int
}
Outputs:
5
2
package main
import "fmt"
func main() {
v := Vertex{5, 2}
fmt.Println(v.X)
fmt.Println(v.Y)
}
type Vertex struct {
X int
Y int
}
Outputs:
5
2
本文标题:Go struct
本文链接:https://www.haomeiwen.com/subject/khkouqtx.html
网友评论