0

When I try my code on Check50, it says it doesn't recover the last file correctly, because it's "Checking for file 015.jpg.". The last file is 050.jpg, and it even says so in cdn.cs50.net/2016/x/psets/4/pset4/pset4.html

But you should find ultimately that the image contains 50 JPEGS

So it shouldn't be looking for 16 JPEGS, but instead 50. Is that a mistake in how the checking is written (as in, it says it checks 16 but actually checks 50) or is something else wrong there?

2

check50 actually uses a different data set for testing, so it is working correctly. (Sneaky of them, isn't it? ;-) It's because of a series of issues over time and is a long story. )

As for not recovering the last file correctly, this is most commonly caused by the last 512 byte block being written to the output file twice because the EOF condition isn't detected correctly. Specifically, this error occurs when the fread() is executed, the data processes and then the EOF is checked.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .