getline(cin,s);
istringstream iss(s);
do
{
    string sub;
    iss>>sub;
    q.insert(sub);
 }while(iss);
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 ':'.
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.
 
     
    