dongmopu6734 2016-07-14 10:53
浏览 70
已采纳

golang编译器说程序正在重新定义尚未重新定义的变量

The compiler is saying that every variable that has been defined is being defined again 5 lines later and pulling up an error, off course i haven't redefined all my variables 5 lines later, how do i stop this bug? this an example of one of the structs

type Holder struct {
    Name  string
    Holders_need int
    Avail int
}

it is claiming that there is redifend on like 32 which is the line after the struct closes I HAVE FOUND THE ANSWER TO THIS

  • 写回答

2条回答 默认 最新

  • dougao9864 2016-07-14 12:15
    关注

    I have found the answer to my question thank you to those who tried to help, if anyone else has this problem check that your compiler isn't attempting to compiler the same program twice, as that is what was happening here!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 手机连接电脑热点显示无ip分配
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突
  • ¥15 超声波模块测距控制点灯,灯的闪烁很不稳定,经过调试发现测的距离偏大