std::string 格式化

来源:互联网 发布:用户 网络数据监控 编辑:程序博客网 时间:2024/06/06 03:54

#include <sstream>std::ostringstream ostr;ostr<<"RMB: ";        for(int i=0; i<size; i++) {    ostr<<array[i]<<" ";}std::string str = ostr.str();//RMB: 1 5 10 20 50 //

0 0