Skip to content

Instantly share code, notes, and snippets.

@swdunlop
Created January 8, 2011 09:03
Show Gist options
  • Save swdunlop/770701 to your computer and use it in GitHub Desktop.
Save swdunlop/770701 to your computer and use it in GitHub Desktop.
2d array of variable size
package main
import "fmt"
func main() {
m, n := 3, 3
a := make( [][]int, m )
for i, _ := range a {
a[i] = make( []int, n )
}
fmt.Println(a)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment