title: Trouble with whole sentence manipulation
body: <p>Im making a pig latin converter, I can get it to manipulate one word and need it to convert whole sentences, making each word outputted in pig latin, below is my code:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cstring&gt;
  #include &lt;fstream&gt;
  
  using namespace std;
  
  bool isVowel (char);
  string rotate(string);
  string plString(string);
  
  int main()
  {
  string str;
  cout &lt;&lt;"Enter a sentence: ";
  getline (cin, str);
  cout &lt;&lt; endl;
  cout &lt;&lt; str &lt;&lt;" in pig latin - " &lt;&lt; plString(str) &lt;&lt; endl;
  
  ifstream infile;
  infile.open("input.txt");
  infile &gt;&gt; str;
  while(infile)
  {
      cout &lt;&lt; plString(str) &lt;&lt; " ";
      infile &gt;&gt; str;
  }
  
  cout &lt;&lt; endl;
  }
  bool isVowel (char ch)
  {
  switch (ch)
  {
  case 'A':
  case 'E':
  case 'I':
  case 'O':
  case 'U':
  case 'Y':
  case 'a':
  case 'e':
  case 'i':
  case 'o':
  case 'u':
  case 'y':
      return true;
  default:
          return false;
  }
  }
  string rotate(string str)
  {
  string::size_type len = str.length();
  string str1;
  str1 = str.substr(1, len - 1) + str[0];
  return str1;
  }
  string plString(string str)
  {
  string::size_type len;
  bool vowel;
  string::size_type counter;
  if (isVowel (str[0]))
      str = str + "way";
  else
  {
      str = str + "";
      str = rotate(str);
      len = str.length();
      vowel = false;
      for (counter = 1; counter &lt; len - 1; counter++)
          if (isVowel (str[0]))
          {
              vowel = true;
              break;
          }
          else
              str = rotate(str);
      if(!vowel)
          str = str.substr(1,len) + "way";
      else
          str = str + "ay";
  }
  return str;
  }
  </code></pre>
  
  <p>any advice on how to get this to do full sentences would be greatly appreciated!</p>