如何在Python中将double转换为字符串? - How do I convert a double into a string in C++?

问题:

I need to store a double as a string. 我需要将double存储为字符串。 I know I can use printf if I wanted to display it, but I just want to store it in a string variable so that I can store it in a map later (as the value , not the key ). 我知道如果我想显示它我可以使用printf ,但我只是想将它存储在一个字符串变量中,以便我以后可以将它存储在一个地图中(作为 ,而不是 )。


解决方案:

参考一: https://en.stackoom.com/question/1OOd
参考二: https://stackoom.com/question/1OOd
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章