I am currently working on cs50's pset4 recover. I have managed to compile the program. However, when run, the images are corrupt and apparently, according to image viewer, are not jpeg files, because they start with different code. My program follows below. Any help would be great. Thanks!
[MOD: hid code behind edit link per academic honesty policy]