C++ Convert int to char and get ASCII Value

April 22, 2010

If you are wanting the ASCII value for an integer simply do a typecast of the int to a char.

int i = 65;
cout << (char)i;

Your output should be "65"