title: Extracting arguments using stringstream
body: <p>I want to input a phrase and extract each character of the phrase:</p>
  
  <pre><code>int main()
  {
      int i = 0;
      string line, command;
      getline(cin, line); //gets the phrase ex: hi my name is andy
      stringstream lineStream(line);
      lineStream&gt;&gt;command;
      while (command[i]!=" ") //while the character isn't a whitespace
      {
          cout &lt;&lt; command[i]; //print out each character
          i++;
      }
  }
  </code></pre>
  
  <p>however i get the error: cant compare between pointer and integer at the while statement</p>