fork download
  1. #include <iostream>
  2. #include <string>
  3. #include <boost/algorithm/string/erase.hpp>
  4.  
  5. int main()
  6. {
  7. std::string s = "9X^3 + 5X";
  8. boost::erase_all(s, " ");
  9. std::cout << s << '\n';
  10. }
  11.  
Success #stdin #stdout 0.02s 2868KB
stdin
Standard input is empty
stdout
9X^3+5X