fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4.  
  5. using namespace std;
  6.  
  7. int main()
  8. {
  9. std::string str="Hello8$World";
  10. replace_if(str.begin(),str.end(),::isdigit,' ');
  11. replace_if(str.begin(),str.end(),::ispunct,' ');
  12. return 0;
  13. }
Success #stdin #stdout 0s 3452KB
stdin
Standard input is empty
stdout
Standard output is empty