Author: Unknown
Subject: clarification on command-line arguments
Date: Thursday, 19 Mar 2020, 06:40:50
The specs state "If POS is not specified, then its default value is 0 and the name of the first file may not begin with a -." Does this mean that we will not be given a file that starts with a - if POS is not specified, or we have to ensure that the first file does not begin with a - if POS is not specified? Is this an additional error to check, or is it a limitation on the tests our code will be tested on? Can we assume that if argv[1] starts with '-', then POS is specified? (and if whatever following '-' is not an integer, then an error is displayed and the program quits).PREV INDEX NEXT