title: error: invalid conversion from ‘char’ to ‘const char*
body: <p>In the following code</p>
  
  <pre><code>#include &lt;stdlib.h&gt; //atoi
  #include &lt;string&gt;   
  
  using namespace std;
  
  namespace roman
  {
      string convert( int input )
      {
          string inputStr = to_string(input);
          if(inputStr.size()==4)
          {
              return string( atoi( inputStr[0] ), 'M')+convert(stoi(inputStr.substr(1, npos)));//error here
          }
      }
  }
  </code></pre>
  
  <p>I am getting the titular error in the <code>return</code> line. I think it has something to to with the atoi function. It takes a <code>const char*</code> as the input value. I need to know how to turn the first character in <code>inputStr</code> into a <code>const char*</code>. I tried appending <code>.c_str()</code> to the end of <code>inputStr[0]</code>, but that gave me the error <code>request for member c_str which is of non-class type char</code>. Anyone have some ideas?</p>