Hello!
How can I convert an integer to it's associated character?
For instance the value "27" stands for the "ESC-Key", "97" stand for "a" and so on.
Thank you,
Printable View
Hello!
How can I convert an integer to it's associated character?
For instance the value "27" stands for the "ESC-Key", "97" stand for "a" and so on.
Thank you,
Chars are just small integers, so
ch = 'a';
ch = 97; // assuming ASCII
are the same thing.
ok. but I am not completely sure how to use it.
I want to do a sort of key-mapping. Therefore on the one hand I get the key as a const char* which I want to convert to the associated ASCII number.
But I also want to do this in the other direction so that I get a char* representation of the ASCII code.
[EDIT]: I got it ;).
Another question: how can I convert a char* to a ASCII code?
(e.g. "a" => 97).
Thank you. I finally got all working.