You have several options for getting words out of a line. You can repeatedly call your string's find member function to find each space (and then get substrings), but that's needlessly complicated.
There's a simpler solution: just create an std::istringstream: std::istringstream wordstream(your_line); //#include <sstream> From there, your istringstream behaves quite similarly to std::cin, although it reads from a string instead of standard input. You can use the >> operator or repeatedly call std::getline with the third parameter set to ' '.
Alternatively, if you have access to Boost, boost::split is also an option.
You'll never be good with C++ until you start to actually write code yourself. If you want to use an stringstream, you should first "research" that term to see how you might be able to use that idea in your own code.