如何将int转换为字符串?

时间:2013-09-28 12:31:00

标签: c++

朋友们,我想知道如何将int值转换为字符串值。

1 个答案:

答案 0 :(得分:3)

使用std::to_string

int i = 42;
std::string s = std::to_string(i);
相关问题