c++ 默认类型转化的坑
2021-05-07 本文已影响0人
sealwang24
1 // to_string example
2 #include <iostream> // std::cout
3 #include <string> // std::string, std::to_string
4 #include <typeinfo>
5 using namespace std;
6 int main ()
7 {
8 int c = 1;
9 std::string a;
10 a = c;
11 cout << a ;
12 return 0;
13 }
既然能编译过
然后,输出为空