Splitting a C++ std::string using tokens, e.g. ";"
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/236129/how-to-split-a-string-in-c">How to split a string in C++?</a>  </p>
</blockquote>



<p>Best way to split a string in C++? The string can be assumed to be composed of words separated by ;</p>

<p>From our guide lines point of view C string functions are not allowed and also Boost is also not allowed to use because of security conecerns open source is not allowed.</p>

<p>The best solution I have right now is:</p>

<p>string str("denmark;sweden;india;us"); </p>

<p>Above str should be stored in vector as strings. how can we achieve this?</p>

<p>Thanks for inputs.</p>
