I am trying to send unsigned characters through a program, and I would like to be able to get the numbers through standard input (ie std::cin). For example when I type 2 I woul
When you enter 2 via std::cin, it's correctly interpreted as the character literal '2'.
2
std::cin
'2'
You should replace
unsigned char e = 2;
with
unsigned char e = '2';