best C++ command line argument parser [duplicate]

2019-02-11 01:39发布

问题:

Possible Duplicates:
What parameter parser libraries are there for C++?
C++ Parse Command Line Arguments

What is the best C++ command line argument parser that you can suggest?

回答1:

Try Boost::Program Options. It allows you to read and parse command lines as well as config files.



回答2:

I like C's getopt(), but then I'm old. :-)



回答3:

Google's gflags



回答4:

Boost program_options.