fork download
  1. #include <boost/algorithm/string.hpp>
  2. #include <boost/lexical_cast.hpp>
  3. #include <iostream>
  4. #include <vector>
  5. #include <string>
  6.  
  7. using namespace std;
  8.  
  9. int main()
  10. {
  11. string input("geeks");
  12. vector<string> result;
  13. boost::split(result, input, boost::is_any_of(":"));
  14.  
  15. for (int i = 0; i < result.size(); i++)
  16. cout << result[i] << endl;
  17. return 0;
  18. }
Success #stdin #stdout 0.01s 5284KB
stdin
Standard input is empty
stdout
geeks