Furthermore character literals are of type int in C and char in C++. You can convert ... which is then going through the C language integer promotions ch = ( int)ch ...
stackoverflow.com