title: "No suitable conversion function from 'std::string' to 'const char *' exists"
body: <p>I'm trying to write a simple loop that takes a string and goes through each character of said string and stores it inside another string (the same string every time). I want to use this loop to perform simple tasks, such as displaying a word in reverse, or displaying each character in a separate line (which is where the example provided below comes from). My code goes something like this:</p>
  <pre><code>#include &lt;string&gt;
  using namespace std;
  
  int main(){
     c++
     string word;
     string ch;
     cout &lt;&lt; &quot;Please enter a word.&quot; &lt;&lt; endl;
     cin &gt;&gt; word;
  
     int wordlength;
     int i;
  
     wordlength = size(word);
  
     for (i = 0; i &lt; wordlength; i++) {
         word.copy(ch, 1, i);
         cout &lt;&lt; ch &lt;&lt; endl;
     }
  }
  </code></pre>
  <p>But whenever I use this code, I get the error in the title:</p>
  <p><strong>&quot;No suitable conversion function from 'std::string' to 'const char *' exists&quot;</strong></p>
  <p>What am I doing wrong?</p>