title: Invalid Conversion from char to string
body: <p>In my code, I made a string and I pushed that string to a stack. 
  (I don't know if I did it correctly as I am new to C++ and the concept of stacks)
  But when I try to top (I think this outputs the first element in the stack) it doesn't work correctly. I get a conversion issue from char to string. Even if I cast it as char it doesn't work correctly.
  Is there some way to convert it?
  I am trying to get it to out put h.</p>
  
  <p>I keep getting the error : </p>
  
  <p>C:\main.cpp:15:37: error: invalid user-defined conversion from 'char' to 'std::stack >::value_type&amp;&amp; {aka std::basic_string&amp;&amp;}' [-fpermissive]
               nextWord.push(str[i + 1]);</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;iomanip&gt;
  #include &lt;map&gt;
  #include &lt;string.h&gt;
  #include &lt;stack&gt;
  
  using namespace std;
  
  int main(){
  std::stack&lt;string&gt; nextWord;
  string str = "T&lt;h&gt;is is a test";
  
  for(int i = 0; i &lt; str.length(); i++){
      if (str[i + 2] == '&gt;' &amp;&amp; str[i] ==  '&lt;'){
          nextWord.push(str[i + 1]);
      }
  }
  while (!nextWord.empty()) {
      cout &lt;&lt; "String: " &lt;&lt; nextWord.top();;
  }
  
  cout &lt;&lt; nextWord.pop() &lt;&lt; '&gt;' ;
  }
  </code></pre>