Vector of comma separated token to const char**
问题 I am trying to convert a comma separated string to vector of const char*. With the following code, by expected output is ABC_ DEF HIJ but I get HIJ DEF HIJ Where am I going wrong? Code: #include <iostream> #include <boost/tokenizer.hpp> #include <vector> #include <string> using namespace std; int main() { string s("ABC_,DEF,HIJ"); typedef boost::char_separator<char> char_separator; typedef boost::tokenizer<char_separator> tokenizer; char_separator comma(","); tokenizer token(s, comma);