PREV INDEX NEXT

Author: Stan Eisenstat
Subject: Re: [Cs223] Qsort - Exiting if file does not exist
Date: Wednesday, 18 Mar 2020, 18:10:39


    > Message Posted By: Unknown
    >
    > Say we enter multiple files on the command-line. If the first few file(s)
    > are successfully able to have their lines pushed onto the deque and we
    > suddenly run into a file that cannot be opened, are we to immediately exit
    > the program, or would we need to destroy the deque before exiting (to
    > account for memory leaks)?

As stated in the specification:

  1. If POS and/or LEN is not a nonempty sequence of digits, or a file does not
     exist, or one of the Deque functions reports an unexpected error (e.g.,
     createD() returns false), then Qsort writes a one-line error message to the
     standard error and exits.

Destroying the Deques is not required.

--Stan-
PREV INDEX NEXT