Skip to main content
1 vote
Accepted

PSET4 Recover, output files are blank

This code has an infinite loop. Look at the last while condition statement: while (fread(buffer, 512, 1, forensic) <= 1); What happens when the end of the input file is reached? fread will ...
Cliff B's user avatar
  • 69.1k
1 vote
Accepted

Pset4: Recovery- Empty JPEG files

You seem to be missing a concept. Each jpg will be made up of multiple blocks of 512B. Your goal is to read from the rawfile until you find a signature block. Once you do, if you already have found ...
curiouskiwi's user avatar
  • 18.7k
1 vote
Accepted

CS50 Week 4 Recover. Generating 50 Blank images

The biggest problem here is that the code is trying to test for a signature before actually reading in the data from the input file. It's doing a "Ready, Fire, Aim." Order of actions is ...
Cliff B's user avatar
  • 69.1k

Only top scored, non community-wiki answers of a minimum length are eligible