这是我的代码:
package main
import (
"strconv"
"fmt"
)
func main() {
t := strconv.Itoa64(1234)
fmt.Println(t)
}
问题:
为什么会出现以下错误消息?
命令行参数.\test.go:7: undefined: strconv.Itoa64在0.2秒内完成,退出代码为2
发布于 2012-09-01 01:31:19
这是因为Itoa64不是strconv包中函数的名称。看起来你真的想要。
t := strconv.FormatInt(1234, 10)
发布于 2017-04-20 19:31:38
您可以像这样简单地转换
func main() {
t := int64(1234)
fmt.Println(t)
}
https://stackoverflow.com/questions/12219911
复制相似问题