Parse command line arguments with getopt_long()

by by at meetlost.com
Thu Sep 7 06:49:59 UTC 2017


Hi,

I am writing a program which need parse command line arguments like "--myoption somevalue", and what I found is getopt_long(). After read the man page, I realize that this function can parse arguments like "--myoption=somevalue", the problem is, the somevalue can be integer only.

Is there any function already there to parse command line arguments with string values?

If not, I think I need parse argv manually.

by


More information about the freebsd-hackers mailing list