I have code and I first retrieve a character using fgetc (using the file pointer of "stdin"). Then after a couple of printf functions, I try to do fgets from "stdin" but the prompt doesn't come up.
I took out the fgetc to make sure my syntax and use of fgets was not wrong, and fgets worked when I editted out fgetc. When I put fgetc back in before the fgets, the fgets function didn't work again.
What could be causing this?? Any fix for this?
Thanks.



LinkBack URL
About LinkBacks



When you use fgetc or any of its buddies to read a single character, the stream actually gets two characters because you have to hit Enter: