Will a struct be modified when in receiver method it is referred to as pointer?

前端 未结 0 876
無奈伤痛
無奈伤痛 2021-02-10 01:30

I am trying to implement a tree in Go.

type BinaryNode struct {
    left  *BinaryNode
    right *BinaryNode
    data  int
}

type BinaryTree struct {
    root *Bi         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题