GDB cant see global variable when inside another function of Golang program

前端 未结 0 359
独厮守ぢ
独厮守ぢ 2021-01-31 07:34

I have simple code:

package main
import "fmt"

var a int = 0

func printit () {
    var b int = 1
    fmt.Printf("a=%d b=%d\\n",a,b) // here i         


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