Hi,
If you are using C, the setbuf() or better, the setvbuf() function will do what you want.
the command
setvbuf(fp,NULL,_IONBF,0);
Will turn off buffering in a console window, you can then use getchar() or similar to read the character thus:
Example program (tested with Dice C, copied from the examples)
#include
#define BUFFER_SIZE 128
main()
{
int c;
char buf[256];
setvbuf(stdin,NULL, _IONBUF,0);
printf("Type a character: ");
fflush(stdout);
c=getchar();
printf("c=%d\n");
return(0);
}
Ian