Originally posted by pieter1994
That's like exactly what I saw before ! thx! but can u explain some more? cause it was with ehm... like: If else & if etc
Well, ascii values are integers, but the character it self is a char data type, so you need to cast the type of char, onto the integer (ascii code)
type casting:
const char letter_A = 'A';
cout<<int(letter_A);
//we type cast the character to integer so it displays the integer not the character.
//output: 65
//This works other way round
cout<<char(65);
//output: A