Advertisement
193030

Substrain string

Feb 21st, 2020
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.25 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3. using namespace std;
  4. string ns;
  5.  
  6. using namespace std;
  7. int main()
  8. {
  9.  
  10.    string s = "Hello world";
  11.    cout << s.substr(6) << endl;
  12.    cout << s.substr(6,2) << endl;
  13.    cout << s.substr(6,20) << endl;
  14.  
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement