首页 > > > C++任意类型转化成字符串
#include #include #include int main(int argc, char** arg){ using namespace std; string s1 = "1"; ostringstream os; os << s1 << 1 << "---" << 0.235; s1 = os.str(); cout << s1 << endl; getchar(); return 0; }
原文作者:;如有侵权,请联系管理员删除。
注册时间:2020-05-21