Last active
May 25, 2019 10:44
-
-
Save hiepndd/49be60cfae3397ffb8cddc6e48fccd5e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package main | |
| import "fmt" | |
| func double(x *int) { | |
| *x = *x + *x | |
| } | |
| func main() { | |
| var a = 3 | |
| double(&a) | |
| fmt.Println(a) //6 | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment