C: Clearing STDIN
问题 basically in codeblocks for windows before each printf I have "fflush(stdin);" which works. When I copied my code to Linux, it doesn't work, nor does any of the alternatives for "fflush(stdin);" that I've found. No matter which way I seem to do it, the input doesn't seem to be clearing in the buffer or something in my code is incorrect. #include <stdio.h> #include <math.h> #include <limits.h> #include <ctype.h> int main() { char pbuffer[10], qbuffer[10], kbuffer[10]; int p=0, q=0, k=0; int r,