optarg

  • Version 3.5 and earlier : optarg variable not available.
  • Version 4.0 and later: optarg variable available.

Integer, read-only

Used with getopt functions. Contains the parameter for the last argument or an empty string if none was found.

A positive integer.

if (option == "f") filename = optarg;

For more information, please see the following: