fork(2) download
  1. #include <iostream>
  2. #include <algorithm>
  3. #include <string>
  4.  
  5. int main()
  6. {
  7. std::string s = "abcdef";
  8. std::cout << s << '\n';
  9. std::rotate(s.begin()+1, s.begin()+4, s.begin()+5);
  10. std::cout << s << '\n';
  11. }
Success #stdin #stdout 0s 2816KB
stdin
Standard input is empty
stdout
abcdef
aebcdf