title: How to print the ASCII value of a int in C++?
body: <p>I'm beginner in c++ and I want to write a program that prints the ASCII value of the alphabet ('a', 'b',.... 'z') and of the numbers ('0'...'9').</p>
  
  <p>I'm able to print the ASCII value of the alphabet using the "int()" function.</p>
  
  <p>Example:</p>
  
  <pre><code>char a = 'a';
  
  std::cout&lt;&lt;int(a);
  </code></pre>
  
  <p>The result of the code above was "97", as I expected.</p>
  
  <p>But, I don't know how to print the ASCII value of the numbers. For example, if I have the int 2, I want to get the ASCII value of 2, that it's 48.</p>
  
  <p>I've tried to use the function "int()" but the result it's the int value, not the ASCII value.</p>