Advertisement
mosaid

Untitled

Oct 23rd, 2020
2,272
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include<iostream>
  2. #include<string>
  3.  
  4. int main(int argc, char *argv[])
  5. {
  6.     std::string str;
  7.     str = "hello World";
  8.     str += " and hello again";
  9.     std::cout<<str<<"\n";
  10.     str.replace(str.begin(),str.end(),"hello","HELLO");
  11.     std::cout<<str<<"\n";
  12.     return 0;
  13. }
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement