I want to be able to input single characters without pressing enter, following is a sample code. Is there any way to do it so it runs on every machine?
#include <stdio.h>
#include <stdlib.h>
int main() {
char c;
c = getc(stdin);
while(c != 'e'){
printf("ok");
c = getc(stdin);
}
printf("done");
return 0;
}