When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
9 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question run !howto ask.
And this is my homework trace :
As you can see I pass 9 tests on 10, apparently my function doesn't work well for short file with EOF, any idea on what could be wrong with my function ?
i don't know much what's happening here but you're not checking for EOF anywhere are you
If I'm not wrong, read return 0 if EOF is found
so when I check res == 0 it's checking EOF right
This is function prototype btw ** Reads a new character from the stream's buffer. ** If the buffer it empty, it should be refilled. ** Works just like fgetc(3). May set the error indicator. */ int lbs_fgetc(struct stream *stream);
@fossil wave
Please don't delete forum posts. They can be helpful to refer to later and other members can learn from them. You can use !solved to close a post and mark it as solved.
!solved