I was learning about pointers in Google Go. And managed to write something like,
func hello(){
fmt.Println("Hello World")
}
func main(){
pfunc := hello //pfunc is a pointer to the function "hello"
pfunc() //calling pfunc prints "Hello World" similar to hello function
}
Is there a way to declare the function pointer without defining it as done above? Can we write something like we do in C?
e.g. void (*pfunc)(void);