You could do it like this:
#include <iostream>
int main()
{
int c;
do
std::cout << "Enter ASCII value (0 to exit): ";
std::cin >> c;
std::cout << "Character = " << char(c) << std::endl;
} while (c > 0);
}
9.2m questions
11.9m answers