Wait, it does work to use switch(ch=getch()). The error was actually to do with me making case check if the input variables were equal to something.