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