Reference: https://www.cnblogs.com/myyan/p/4699940.html
This is a Google open-source command-line parameter resolution tool that supports reading parameters from environment variables, configuration files (you can use gflags instead of configuration files)
Define parameters:
Use GFlags to include header files #include <gflags/gflags.h>
(#define是C语言中提供的宏定义命令)
GFlags supported parameter types include: bool, Int32, Int64, UInt64, double, string, and so on, define the parameters through the Define_type implementation, in the following example, define a bool and a string type parameter, Then the three parameters of the macro are the command line parameter name, the parameter default value, the parameter's help information.
Define_bool (Big_menu, True, "Include ' advanced ' options in the menu listing");
Define_string (Languange, "中文版, French, German", "comma-separated list of languages to offer in the ' Lang ' Menu");
Command-line arguments for C + + (Gflag)