title: Trying to replace words in a string
body: <p>I am trying to take the words from output and find any word with the letter Q in it.  If the word does, it needs to be replaced by the word "bad". After that, I am trying to append each word to output2. I am having trouble doing this.  The error I get when I compile is: </p>
  
  <blockquote>
    <p>invalid conversion from 'const char*' to 'char' [-fpermissive]</p>
  </blockquote>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;string&gt;
  #include &lt;cstdlib&gt;
  #include &lt;sstream&gt;
  using namespace std;
  string manipulate(string x);
  int main(int argc, char* argv[])
  {
  string input, temp, output, output2, test, test2;
  int b;
  cout &lt;&lt; "Enter a string: ";
  getline(cin, input);
  istringstream iss(input);
  while (iss &gt;&gt; test)
  {  
        if(test.length() != 3)
        {
          test.append(" ", 1);   
          output.append(test);
        }
  }
  
  istringstream iss2(output);
  while (iss2 &gt;&gt; test2)
  {
        for(int i = 0; i&lt;test2.length(); i++) 
     {
       switch(test2[i])
        {
             case 'q':
             test2[1]="bad";
             output2.append(test2);
             break;
        }
  
     }
  }
  cout &lt;&lt; "Your orginal string was: " &lt;&lt; input &lt;&lt; endl;
  cout &lt;&lt; "Your new string is: " &lt;&lt; output2 &lt;&lt; endl;
  cin.get();
  return 0;
  }
  </code></pre>