返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. int main()
  4. {
  5.     string str="0123456789";
  6.     cout<<str.substr(5)<<endl;
  7.     cout<<str.substr(2)<<endl;
  8.     cout<<str.substr(3,3)<<endl;
  9.     cout<<str.substr(7,1)<<endl;
  10.     system("pause");     
  11.     return 0;   
  12. }
複製代碼

TOP

返回列表