Questions tagged [fclose]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
156 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
112 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" ...
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 ...
1
vote
1answer
1k 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 ...