#include
#include
#include
#include
#include
using namespace std;
int main( )
{
string text( "this is a test" );
istringstream stream( text );
// make a vector with each word of the text
vector< string > words( (istream_iterator( stream )),istream_iterator() );
cout << words.size() << " : " << text;
}