<p>How do you split a string into tokens in C++?</p>

It depends on how complex the token delimiter is and if there are more than one.  For easy problems, just use std::istringstream and std::getline.  For more complex tasks or if you want to iterate the tokens in an STL-compliant way, use Boost's Tokenizer.  Another possibility (although messier than either of these two) is to set up a while loop that calls std::string::find and updates the position of the last found token to be the start point for searching for the next.  But this is probably the most bug-prone of the 3 options.