/* strtok example */
#include <iostream>
#include <cstring>
int main ()
{
char str[]
="This is a sample string, just testing.";
char * pch;
cout <<
"Splitting string " << str << into tokens: ;
pch = strtok
(str," ");
while (pch !=
NULL)
{
cout
<< pch;
pch =
strtok (NULL, " ,.");
}
return 0;
}