You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

670 B

point

Instructions

Créer un fichier .go.

  • Le code ci-dessous doit être copié dans ce fichier.

  • Les changements nécéssaires doivent être appliquer et the code below into that file and do the necessary changes so that the program works.

  • Le programme doit être rendu dans un dossier nommé boolean.

Code à copier

func setPoint(ptr *point) {
	ptr.x = 42
	ptr.y = 21
}

func main() {
	points := &point{}

	setPoint(points)

	fmt.Printf("x = %d, y = %d\n",points.x, points.y)
}

Usage

student@ubuntu:~/[[ROOT]]/test$ go build
student@ubuntu:~/[[ROOT]]/test$ ./test
x = 42, y = 21
student@ubuntu:~/[[ROOT]]/test$