title: error: invalid conversion from 'char' to 'const char*' in palindrome program
body: <p>This code is an attempt to test whether or not a string is a palindrome. It reads a string of characters, pushing each character onto a stack as it is read and simultaneously adding it to a queue. Then, it uses basic stack and queue operations to determine if the string is a palindrome.</p>
  
  <p>The program blows up with the aforementioned error(s) when it hits:</p>
  
  <pre><code>inStack.push(inString[i]);
  inQueue.push(inString[i]);
  </code></pre>
  
  <p>and I don't understand why, or how to fix it. The research I have done looking into this error as it applies to my case hasn't been fruitful. I'm fairly new to c++ so forgive me if I'm overlooking something stupid.</p>
  
  <p>The code is as follows:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;stack&gt;
  #include &lt;queue&gt;
  #include &lt;string&gt;
  
  using namespace std;
  
  int main()
  {
      stack &lt;string&gt; inStack; 
      queue &lt;string&gt; inQueue;
      string inString; //user input
      int inLength; //loop counter variable
      bool isPalindrome(false);
  
      cout&lt;&lt;"Enter a word to see if it is a palindrome: ";
      cin&gt;&gt;inString;
  
      if (inString.size() &gt; 0)
      {
          for (int i = 0; i &lt;= inLength; i++)
          { 
              inStack.push(inString[i]); //put string chars onto stack
              inQueue.push(inString[i]); //add string chars to queue
          }
  
          isPalindrome = true;
  
          while (isPalindrome &amp;&amp; (!inStack.empty()) &amp;&amp; (!inQueue.empty()))
          {
              if (inStack.top() != inQueue.front())
              {
                  isPalindrome = false;
              }
              else
              {
                  inStack.pop();
                  inQueue.pop();
              }
          }
      }
  
      if(isPalindrome == false)
      {
          cout&lt;&lt;"It is not a palindrome."&lt;&lt;endl;
      }
      else
      {
          cout&lt;&lt;"It is indeed a palindrome."&lt;&lt;endl;
      }
  
  return 0;
  }
  </code></pre>