I have a menu displayed, if the user presses H or h, it does something.
If the user presses S or s, it does something else.
If the user presses E or e, the program exits.
This works: while ((ch = getch()) != 'e')
but not the following:
Code:while ((ch = getch()) != 'e' || (ch = getch()) != 'E' ) { if (ch == 'H' || ch == 'h' ) { printf("asdf\n"); } else if (ch == 'S' || ch == 's' ) { printf("erwer\n"); } else { printf("Will display status by default\n"); } }
The terminal just seems to lock up.