Fix getch usage : it returns an int. Type variables accordingly