"Go 구조체"의 두 판 사이의 차이

잔글 (봇: 자동으로 텍스트 교체 (-</source> +</syntaxhighlight>, -<source +<syntaxhighlight ))
8번째 줄: 8번째 줄:
import "fmt"
import "fmt"


// vertex = 정점(頂點)
type Vertex struct {
type Vertex struct {
X int
X int

2021년 4월 9일 (금) 10:23 판

1 개요

Go Structs
Go 구조체
package main

import "fmt"

// vertex = 정점(頂點)
type Vertex struct {
	X int
	Y int
}

func main() {
	fmt.Println(Vertex{1, 2})
}

2 같이 보기

3 참고

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}