c++ int转string

来源:互联网 发布:c4d r16 mac 编辑:程序博客网 时间:2024/06/09 22:12
#include "stdafx.h"
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
stringstream strStream;
int a = 100;
float f = 23.5566;
strStream << a << "----"<< f ;
string s = strStream.str();
cout << s << endl;
system("pause");
return 0;
}
原创粉丝点击