Skip to main content

Questions tagged [fclose]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
99 views

CS50 Problem Set 4 - Recover, fclose undeclared identifier issue

My first time posting on the forum so hope someone can help. I've been scratching my head over this code for a while now and can't understand why I get the undeclared identifier! My code seems to ...
Jonathan Pittock's user avatar
1 vote
1 answer
118 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" ...
peachykeen's user avatar
0 votes
1 answer
166 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 ...
Yana Mikhnich's user avatar
1 vote
1 answer
2k 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 ...
Alejandro's user avatar
1 vote
1 answer
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 ...
Adam Wilson's user avatar