gets function is missed, not even given a chance to enter enything.
I have written function that allows a user to enter a long string of text into a file:
printf("\n\nPlease enter in your text."
"\nTo finish, please press enter.\n\n");
If I put this function as a main one i.e. void main (void), is works fine, temp.txt is changed to whatever the user types.
However, when I use this function being called by another function (shown below), the "gets" function is missed, as in I'm not given a chance to write anything.
The menuoption3() function is called from the main function in a switch function like this:
So why doesn't the "gets" function allow me to type data at runtime?
void main (void)
case 2: menuoption2();break;
case 3: menuoption3();break;
case 4: menuoption4();break;
Thanks in advance,