返回列表 發帖
  1. #include<cstdlib>
  2. #include<sstream>
  3. using namespace std;
  4. int main()
  5. {
  6.     stringstream ss;
  7.     string str1="abc";
  8.     string str2="狗咬豬";
  9.     int a=12;
  10.     float b=3.456;
  11.     ss<<str1<<str2<<a<<b<<"...";
  12.     string str;
  13.     ss>>str;
  14.     cout<<str<<endl;
  15.     system("pause");
  16.     return 0;
  17. }
複製代碼

TOP

返回列表