i was using a macro i created to clear the buffer after a scanf, but i was told it is not a good idea for "Many reasons". Could you explain me why and how should i clean it? I know that using fflush(stdin) is a very bad idea since it's not defined.
This is the macro i was using:
#define CLEAR_BUFFER do { c = getchar(); } while (c != '\n' && c != EOF);
And also, another question: in the "real world" is scanf used? And if yes, how do people clean the buffer?
Thanks