How do I convert an integer into an Ascii character, Int=65 should give an “A”. I found intToAscii but what library do I need? I tried #include <stdio.h> but get “intToAscii was not declared in this scope”.
65 is already the ordinal number of the ‘A’ character.
>>> chr(65) 'A' >>> ord('A') 65
If you have an
int that is in the ASCII range (0-0x7F normally), then a pure case to
char will do what you want.
int someNum = 65; char someChar = (char) someNum; //contains 'A'. Internally, still the exact same number. // just a different interpretation of it.