Search:
Forum
General C++ Programming
About the string function...
About the string function...
Sep 5, 2009 at 8:30am UTC
nananya88
(8)
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?
Sep 5, 2009 at 9:28am UTC
firedraco
(6247)
Use .find() to find a character, then .substr() to get parts of the strings.
Sep 5, 2009 at 9:55am UTC
nananya88
(8)
not too understand can give some example?
Sep 5, 2009 at 10:56am UTC
R0mai
(730)
Check out the reference section on this site : use the search box on the top of every page.
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs