I have code that loops upon itself until the user inputs the correctly. Initially, the user input is captured in a char variable like this:
char response [256] = "";
printf ("Please enter a menu selection (1 - 14): ");
fgets (response, 256, stdin);
If the user inputs incorrectly, the same function gets called, but I am having a problem where the initial (incorrect) enter never goes away. I think that I need to reset the "response" variable to null, but I don't know how to do this.