title: Output ASCII value of character
body: <pre><code>#include &lt;iostream&gt;
  
  using namespace std;
  
  int main()
  {
      char x;
      cout &lt;&lt; "enter a character:";
      cin &gt;&gt; x;
      cout &lt;&lt; "ASCII Value of " &lt;&lt; x &lt;&lt; "is" &lt;&lt; string(x);
      return 0 ;
  }
  </code></pre>
  
  <p>the error is </p>
  
  <pre><code>main.cpp||In function 'int main()':| 
  main.cpp|10|error: invalid conversion from 'char' to 'const char*'| 
  main.cpp|10|error:   initializing argument 1 of 'std::basic_string&lt;_CharT, _Traits,_Alloc&gt;::basic_string(const _CharT*, const _Alloc&amp;) [with _CharT = char, _Traits = std::char_traits&lt;char&gt;, _Alloc = std::allocator&lt;char&gt;]'|
  ||=== Build finished: 2 errors, 0 warnings ===|
  </code></pre>