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. std::string m_sten;
  8. std::string m_feal;
  9. std::string m_felt;
  10. std::string m_inte;
  11. std::string m_sag;
  12. std::string m_ende;
  13. std::string m_asko;
  14. std::string m_vit;
  15.  
  16. void test(bool mon)
  17. {
  18. std::string m_caracs = "1,a,,b";
  19. std::vector<std::string> charmps;
  20. boost::split(charmps, m_caracs, boost::is_any_of(","));
  21. for (auto c : charmps)
  22. std::cout << c << std::endl;
  23. }
  24.  
  25. int main()
  26. {
  27. test(1);
  28. }
Success #stdin #stdout 0.01s 5276KB
stdin
Standard input is empty
stdout
1
a

b