fork(1) download
  1. // Example program
  2. #include <iostream>
  3. #include <string>
  4. #include <algorithm>
  5.  
  6. int main()
  7. {
  8. std::string inputStr = "op's fat momЖОПАА";
  9. std::string outputStr;
  10.  
  11. for(auto & c: inputStr)
  12. {
  13. if (isalpha(c) && std::string::npos == outputStr.find(c))
  14. {
  15. outputStr += c;
  16. }
  17. }
  18.  
  19. std::sort(outputStr.begin(), outputStr.end());
  20. std::cout << outputStr;
  21. }
  22.  
Success #stdin #stdout 0s 15240KB
stdin
Standard input is empty
stdout
afmopst