title: What is the most efficient C++ method to split a string based on a particular delimiter similar to split method in python?
body: <pre><code>getline(cin,s);
  istringstream iss(s);
  do
  {
      string sub;
      iss&gt;&gt;sub;
      q.insert(sub);
   }while(iss);
  </code></pre>
  
  <p>I used this technique when question wanted me to split on the basis of space so can anyone explain me how to split when there's a particular delimiter like ';' or ':'.</p>
  
  <p>Someone told me about strtok function but i am not able to get it's usage so it would be nice if someone could help. </p>