replacing scanf with fgets
Dear All,
I realise there are many threads concerning the use of fgets, however I am still having difficulty after having read many of the previous threads!
Put simply, I have to replace every use of scanf in my code with fgets. For example, here is a typical example of the use of scanf in the current code:
/* example */
Code:
int quest;
printf("Are you sure you wish to exit the Menu?\n");
printf("Press 1) to return to Options or 2) to exit the Menu: ");
scanf("%d",&quest);
/* end example */
Any ideas how I replace scanf with the use of fgets? Any advice would be greatly appreciated.
Cheers.....
Code tags added by kermi3