使用 std::to_string()函数,函数接收一个数字返回一个string的字符串 参考链接 std::to_stringC++数值类型与string的相互转换C++数字转字符串 to_string()