Questions tagged [fclose]
The fclose tag has no usage guidance.
4
questions
1
vote
1answer
111 views
Pset4 Recover: Not understanding where to put the forever loop to break out and close the image file
My code for recover.c works except for 015.jpg. I can see the image in the folder, but the file is not closing correctly and thus disrupting check50.
I get that I want to put a "forever loop" ...
0
votes
1answer
151 views
recover segmentation fault fclose
I need your help again. Something wrong with my fclose in both cases (as valgrind said). The program compiles, but it has segmentation fault and doesn't create jpgs. Here is the code (sorry for ...
1
vote
1answer
928 views
Correct use of fopen, fclose, file pointers
I found this problem while working on recover.c. My program recovers all the image files, check50 says everything's cool, but when I run Valgrind, it gives me a ton of errors. After some tests, I ...
1
vote
1answer
377 views
Recover.c Segmentation Fault
Pseudocode:
declare counter
declare filename[8]
main
Open input
Declare buffer
do
read(512 bytes into buffer from input)
while (not start of jpeg)
do
write filename
open ...