||How about C parsing functions? They are also useful. Personally I always use strtok instead of stringstream.
There is a string S which is a text. The separators are: space, period and comma. There may be several separators between words and separators before first and after last words.
for (char *word = strtok(buff, " .,"); word; word = strtok(0, " .,"))
Be careful with char size and remember that "buff" is changed by strtok.
The last: as with any C vs C++ library functions: strtok may be faster than stringstream.