1 class Solution 2 { 3 public: 4 int getWordEnd; 5 string getWord(string str) 6 { 7 string tmp; 8 int i; 9 for(i = getWordEnd;str[i] != ' '&& str[i]!='