I'm almost there, but one more question about recover..
In my code, I open a file inside an if condition, but how do I acces that file later? It's getting out of scope and I'm getting use of undeclared identifier 'img' errors.
while(...)
if (found beginning of jpeg)
if(already opened a jpeg before)
close the previous file
open new file and append to it
FILE* img = fopen("001.jpg, "a")
else
just append to already opened file
fwrite(&buffer, sizeof(BYTE), 512, img) (but the file I created before is now out of scope..)