getopt optstr
It is just a string, and each character of this string represents an option. If this option requires an argument, you have to follow the option character by :.
For example, "cdf:g" accepts the options c, d, f, and g; f requires an additional argument.
An option in command line looks like -option, so you can use the options -c, -d, -f argument and -g.
Dead Dotterel