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

前端 未结 0 518
面向向阳花
面向向阳花 2021-02-10 01:20

I am trying to implement a tree in Go.

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

type BinaryTree struct {
    root *Bi         


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