标签:main span int 3.1 string names pre color div
#include<iostream> #include<string> #include<sstream> using namespace std; int main() { stringstream ss; /*string s = "123.1"; ss << s; float a; ss >> a; cout << a + 1;*/ float b = 10.1; ss << b; string p; ss >> p; cout << p; }
发现一个好用的string转float float转string的东西
标签:main span int 3.1 string names pre color div
原文地址:https://www.cnblogs.com/x-huihui/p/9833733.html