Ir de regreso puntero

Ejemplos de código

0
0

Ir A Devolver Los Punteros De Función

// Program to return a pointer from a function
package main
import "fmt"
 func main() {

  // function call
  result := display() 
  fmt.Println("Welcome to", *result)

} 

func display() *string {

  message := "Programiz"

  // returns the address of message
  return &message

}

En otros idiomas

Esta página está en otros idiomas

Русский
..................................................................................................................
English
..................................................................................................................
Italiano
..................................................................................................................
Polski
..................................................................................................................
Română
..................................................................................................................
한국어
..................................................................................................................
हिन्दी
..................................................................................................................
Français
..................................................................................................................
Türk
..................................................................................................................
Česk
..................................................................................................................
Português
..................................................................................................................
ไทย
..................................................................................................................
中文
..................................................................................................................
Slovenský
..................................................................................................................
Балгарскі
..................................................................................................................
Íslensk
..................................................................................................................