title: no viable conversion from 'value_type' (aka 'char') to 'string' (aka 'basic_string<char, char_traits<char>, allocator<char> >')
body: <pre><code>string convert(string name)
  {
    string code = name[0];
    ...
  }
  </code></pre>
  
  <p>I get "no viable conversion from 'value_type' (aka 'char') to 'string' (aka 'basic_string, allocator >')" from this line.</p>
  
  <p>If I change it to:</p>
  
  <pre><code>string convert(string name)
  {
    string code;
    code = name[0];
    ...
  }
  </code></pre>
  
  <p>Then it works.
  Can anyone explain why?</p>