remove number for source
This commit is contained in:
17
src/new/new.go
Normal file
17
src/new/new.go
Normal file
@@ -0,0 +1,17 @@
|
||||
// ## New
|
||||
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func one(xPtr *int) {
|
||||
*xPtr = 1
|
||||
}
|
||||
func main() {
|
||||
xPtr := new(int)
|
||||
fmt.Println(xPtr)
|
||||
fmt.Println(*xPtr)
|
||||
one(xPtr)
|
||||
fmt.Println(xPtr)
|
||||
fmt.Println(*xPtr)
|
||||
}
|
||||
Reference in New Issue
Block a user