Anonymous user
Keyboard input/Flush the keyboard buffer: Difference between revisions
Keyboard input/Flush the keyboard buffer (view source)
Revision as of 11:02, 27 August 2020
, 3 years ago→Simple solution for stdin
Line 827:
fseek(stdin, 0, SEEK_END);
//
//
// setvbuf(stdin, NULL, _IONBF, 0);
// Now we are able to check if the buffer is really empty.
//
fgets(text, sizeof(text), stdin);
|