#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
stringstream ss;
string str;
int fuck = 123;
ss << fuck;
ss >> str;
cout << str << endl;
return 0;
}
简单明了粗暴,转double等也是类似
#include <iostream>
#include <sstream>
#include <string>
using namespace std;
int main() {
stringstream ss;
string str;
int fuck = 123;
ss << fuck;
ss >> str;
cout << str << endl;
return 0;
}
简单明了粗暴,转double等也是类似