RosettaCodeData/Task/Keyboard-input-Flush-the-keyboard-buffer/D/keyboard-input-flush-the-keyboard-buffer.d
2023-07-01 13:44:08 -04:00

18 lines
226 B
D

extern (C) {
void _STI_conio();
void _STD_conio();
int kbhit();
int getch();
}
void main() {
void flushKB() {
while (kbhit()) getch();
}
_STI_conio();
flushKB();
_STD_conio();
}