Is there a way to "delete" all the newline characters stuck in the buffer from previous reading before asking the user for a new character? Right now I'm doing it like this
scanf("%c ", &trash);
scanf("%c", &input);
scanf("%c", &trash);
and although it works, it seems very inefficient and inelegant. Suggestions?