All the examples I've found in the net about the usage of getopt_long
(for example
this here) declare the struct option
with the long options as static
.
I don't understand why all these examples declare a static variable, I don't see why this should be done and the man pages don't say anything about this either.
Should I declare this variable as a static variable? And why?