Re: [C++] fopen() Segmentation Fault
Originally Posted by
mdurham
Which documentation says that it 'must' exist? I think if the file doesn't exist fopen() will fail. Could the problem be that you are trying to fclose(NULL) ?
If you are opening a file for reading and the file does not exist fopen will fail (return NULL). If you are opening a file for writing then the file will be created if it does not exist. Different behaviour for different modes.
GCS/O d+(-@) s: a-->? C(++) UL P+ L+++@ E@
W++$ N++ !o K++ w(++) !O M(-) !V PS+(++)
PE-() Y+ PGP++ t++(+++@)* 5++ X++@ R+++@
tv+ b++(+++) DI++ D+ G+ e++>++++ h- r y?
Bookmarks