Please see my comment to the question, which is not quite productive.
This is C-style typecast,
(char)
, performed over the value returned by the function
_getch()
. Depending on the profile of
_getch()
, it may or make not make sense. The type char is ANSI (non-Unicode) 8-bit character, something which is majorly obsolete. This function, most likely, might be this one, which would require typecast if you need
char
:
https://msdn.microsoft.com/en-us/library/078sfkak.aspx[
^],
see also:
http://stackoverflow.com/questions/814975/getch-is-deprecated[
^].
This is all old stuff. One C++ way which would not require this ugly type casting is using
cin
and
cout
streams:
http://www.cplusplus.com/doc/tutorial/basic_io[
^].
I think it has its own ugliness and I remember that one of our high-reputation members claimed he hates it; which I would understand, but typecasting for reading from console is worse.
—SA