char
is signed on your platform. 250 is out of range for a signed character. You want:
if (symbol == static_cast<char>(250))
Otherwise symbol
will be promoted to an integer. Alternatively, use unsigned char
instead of char
which may or may not be signed.