Skip to content

Commit

Permalink
슬라이스 선언 예제 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
pyrasis committed Oct 9, 2015
1 parent 41d7635 commit 152d5b4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Unit 22/slice_1.go
Expand Up @@ -5,7 +5,7 @@ import "fmt"
func main() {
var a []int = make([]int, 5) // make 함수로 int형에 길이가 5인 슬라이스에 공간 할당
var b = make([]int, 5) // 슬라이스를 선언할 때 자료형과 [] 생략
c := make([], 5) // 슬라이스를 선언할 때 var 키워드, 자료형과 [] 생략
c := make([]int, 5) // 슬라이스를 선언할 때 var 키워드, 자료형과 [] 생략

fmt.Println(a)
fmt.Println(b)
Expand Down

0 comments on commit 152d5b4

Please sign in to comment.