+ 1
ASCII vaue
how do we print the ASCII value of a variable?
1 Odpowiedź
0
In C++, the function int(n) (where n is the variable you wish to convert) will convert an integer to its ASCII value, so cout << int(a) would output 97, and cout << int(p) would output 112.