About the string function...

I wan to split a word after ' ',and save the another word in another string.
But i donno which command i can use to do it.
Example: "I wan a big house"->string 1: "I" and string 2:"wan a big house".

I m using getline.
getline(cin,input);

and after that how can i split the word?
Use .find() to find a character, then .substr() to get parts of the strings.
not too understand can give some example?
Check out the reference section on this site : use the search box on the top of every page.
Topic archived. No new replies allowed.