问题
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.
来源:https://stackoverflow.com/questions/1436549/best-c-command-line-argument-parser