mirror of
https://github.com/unknwon/the-way-to-go_ZH_CN.git
synced 2025-08-12 01:08:53 +08:00
modify 07.1.md
This commit is contained in:
10
eBook/examples/chapter_7/pointer_array2.go
Normal file
10
eBook/examples/chapter_7/pointer_array2.go
Normal file
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
import "fmt"
|
||||
|
||||
func fp(a *[3]int) { fmt.Println(a) }
|
||||
|
||||
func main() {
|
||||
for i := 0; i < 3; i++ {
|
||||
fp(&[3]int{i, i * i, i * i * i})
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user