I have a problem flushing the input buffer i used to clear it by putting fflush(stdin)but that is of bad practice i have this
that only works with scanf fgets etcCode:void flush(void){ int c; while (c != '\n' && c != EOF){ c = getchar(); } }
but i need to flush the input with getch is there a way to do that