title: How to tokenize string by delimiters?
body: <p>I need to tokenize string by delimiters.</p>
  
  <p>For example:</p>
  
  <p>For <code>"One, Two  Three,,, Four"</code> I need to get <code>{"One", "Two", "Three", "Four"}</code>.</p>
  
  <p>I am attempting to use this solultion <a href="https://stackoverflow.com/a/55680/1034253">https://stackoverflow.com/a/55680/1034253</a></p>
  
  <pre><code>std::vector&lt;std::string&gt; strToArray(const std::string &amp;str,
                                      const std::string &amp;delimiters = " ,")
  {
      boost::char_separator&lt;char&gt; sep(delimiters.c_str());
      boost::tokenizer&lt;boost::char_separator&lt;char&gt;&gt; tokens(str.c_str(), sep);
  
      std::vector&lt;std::string&gt; result;
      for (const auto &amp;token: tokens) {
          result.push_back(token);
      }
  
      return result;
  }
  </code></pre>
  
  <p>But I get the error:</p>
  
  <blockquote>
    <p>boost-1_57\boost/tokenizer.hpp(62): error C2228: left of '.begin' must have class/struct/union
    type is 'const char *const'</p>
  </blockquote>