+ 3
How i print the ascii code of an character with Cout ?
4 Antworten
+ 5
Cast it to int
Test:
char a =44;
cout << a << (int)a << endl;
+ 7
If you don't want to output using cout, then you'll have to use printf(), which I highly not recommend.
+ 2
printf("a = %d \n", 'a'); like this