'getopt for an optional command line argument of type "--my-option" in C

Basically the title. I've been reading the manual pages and can't seem to make it work. Help would be much appreciated.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source