add: unfinished code. people are having problems
This commit is contained in:
19
14-arrays/_experimental/addr/main.go
Normal file
19
14-arrays/_experimental/addr/main.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
age1 := getAge(15)
|
||||
age2 := getAge(25)
|
||||
age3 := getAge(35)
|
||||
|
||||
fmt.Printf("age1 lives in %p\n", age1)
|
||||
fmt.Printf("age2 lives in %p\n", age2)
|
||||
fmt.Printf("age3 lives in %p\n", age3)
|
||||
}
|
||||
|
||||
func getAge(n byte) *byte {
|
||||
m := new(byte)
|
||||
*m = n
|
||||
return m
|
||||
}
|
||||
Reference in New Issue
Block a user