返回列表 發帖
本帖最後由 曲書辰 於 2019-7-20 14:25 編輯
  1. #include<iostream>
  2. #include<sstream>
  3. #include<cstdlib>
  4. using namespace std;
  5. int main()
  6. {
  7.     stringstream a;
  8.     string b;
  9.     int c=123;
  10.     a<<c;
  11.     a>>b;
  12.     cout<<b<<endl;
  13.     system("pause");     
  14.     return 0;   
  15. }
複製代碼
  1. #include<iostream>
  2. #include<sstream>
  3. #include<cstdlib>
  4. using namespace std;
  5. int main()
  6. {
  7.     stringstream a;
  8.     string b;
  9.     int c=123;
  10.     a<<c;
  11.     a>>b;
  12.     cout<<b+"456"<<endl;
  13.     system("pause");     
  14.     return 0;   
  15. }
複製代碼

TOP

返回列表