-
integer to character
Hi,
I have a program where I am using an integer array. I had to get some character input from the keyboard and store it in the integer array which worked fine since it stored it as the ascii integer. However, I now need to output the characters back to the screen but when I do a simple cout statement it obviously stays in the ascii integer. My question is........is there a way to output an integer in its ascii character form?
-
nevermind, I found the answer on one of the articles
-
Check the answer against this C++ style cast:
static_cast<char>(yourIntVal)