fgets does not want to get the input from the keyboard. What I have been reading on the forums is that I need to flush the buffer. Either I haven't been able to figure that out or that is not what I need.
Code:
printf("Enter an exact name to search for a title:");
fgets(bookName, MAXDATANAME, stdin);\
In the FAQ, I saw this:
Code:
puts("Flushing input");
while ((ch = getchar()) != '\n' && ch != EOF);
printf ("Enter some text: ");
(fgets(buf, sizeof(buf), stdin))
But I am not exactly sure what ch and getchar do. So can someone help me figure out how to get fgets read from the keyboard?
Thanx