'strtok' returns tokens in the string. Basically you put it in a loop, give the input string and a delimiter as arguments, it'll keep returning each token. you can put a counter and check for NULL token to exit the loop. for function signature try reading some doc.
It is easier to use std::stringstream class to do that
<other includes here>
string sentence = "Once upon a time there were three little pigs";
while( stream >> word)