fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <algorithm>
  4.  
  5. int main() {
  6. std::string foo = "this, is, a, test";
  7. char chars[] = ",";
  8. foo.erase(std::remove(foo.begin(), foo.end(), chars[0]), foo.end());
  9. std::cout << foo;
  10. return 0;
  11. }
Success #stdin #stdout 0s 3412KB
stdin
Standard input is empty
stdout
this is a test