Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
bgColor#FFcccc
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
bgColor#ccccff
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);

...