...
| Code Block | ||
|---|---|---|
| ||
char *file_name; FILE *file; /* initialize file_name */ file = fopen(file_name, "w+"); if (fopenfile == NULL) { /* handle error condition */ } /* ... */ if (remove(file_name) != 0) { /* handle error condition */ } /* continue performing I/O operations on file */ fclose(file); |
...
| Code Block | ||
|---|---|---|
| ||
FILE *file; char *file_name; /* initialize file_name */ file = fopen(file_name, "w+"); if (fopenfile == NULL) { /* handle error condition */ } if (unlink(file_name) != 0) { /* handle error condition */ } /*... continue performing I/O operations on file ...*/ fclose(file); |
...