That's up to you to decide:
Code:
const char* cstr = "hello world goodbye world";
string str(cstr); //cstring-->c++ string
istringstream input(str); //creates a container called 'input', which
//you can read from like a file
string result="";
string current = "";
while(input>>current) //read from input as if it were a file
{ //the >> operator skips leading whitespace until it finds a character,
//then it stops reading as soon as it encounters trailing whitespace
result += current;
}
cout<<result<<endl; //helloworldgoodbyeworld